Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  

Life is both difficult and time-consuming.


rocksolid / Helpdesk / Re: index.php for apache2?

SubjectAuthor
* index.php for apache2?AnonUser
+* Re: index.php for apache2?AnonUser
|+* Re: index.php for apache2?AnonUser
||`- Re: index.php for apache2?AnonUser
|`- Re: index.php for apache2?AnonUser
`- check thisAnonymous

1
Subject: index.php for apache2?
From: AnonUser
Newsgroups: rocksolid.shared.helpdesk
Organization: novaBBS
Date: Sat, 14 Nov 2020 02:43 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: AnonU...@novabbs.i2p (AnonUser)
Newsgroups: rocksolid.shared.helpdesk
Subject: index.php for apache2?
Date: Sat, 14 Nov 2020 02:43:38 +0000
Organization: novaBBS
Message-ID: <70d8b2abed18130df714ab61ac675f4f$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="14654"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs
X-Rslight-Site: $2y$10$YQ3knv6uE6/mKTsFtOrkRO9tN..mQek2MczdkMCtPKG4cW3CNeiY6
View all headers
Hello. I need a bit of help. I’m using a Kali Linux operating system and I’m hosting a webpage on the Apache2 web server. The main configuration file for the Apache2 web server is in the apache2.conf file. I want the Apache2 web server to take index.php instead of index.html, but I don’t know how to get the Apache2 web server to take the .php extension instead of the .html extension. Could someone please instruct me on how to do this?
--
Posted on novaBBS
www.novabbs.com


Subject: Re: index.php for apache2?
From: AnonUser
Newsgroups: rocksolid.shared.helpdesk
Organization: novaBBS
Date: Sat, 14 Nov 2020 10:15 UTC
Path: i2pn2.org!rocksolid2!.POSTED.localhost!not-for-mail
From: AnonU...@novabbs.i2p (AnonUser)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: index.php for apache2?
Date: Sat, 14 Nov 2020 10:15:27 +0000
Organization: novaBBS
Message-ID: <f4aa36b7cd0c6dae532003c651938d09$1@news.novabbs.org>
References: <70d8b2abed18130df714ab61ac675f4f$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: novabbs.org; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="5372"; mail-complaints-to="usenet@novabbs.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.org
X-Rslight-Site: $2y$10$DYLfUTB3nQfI17e2j6aMceywaU4ruB5g/Tr42EoohK26ELfQPguJq
View all headers
AnonUser wrote:

Hello. I need a bit of help. I’m using a Kali Linux operating system and I’m hosting a webpage on the Apache2 web server. The main configuration file for the Apache2 web server is in the apache2.conf file. I want the Apache2 web server to take index.php instead of index.html, but I don’t know how to get the Apache2 web server to take the .php extension instead of the .html extension. Could someone please instruct me on how to do this?

Apache can serve .php files, it just takes some configuration and making sure you have all the right software installed.

You need to have php installed. I don't know much about Kali, but I assume there are packages and you can install php this way. Just install the latest version you have available to you.

You also need to make sure you have the php apache module installed. Something like libapache2-mod or similar.

Once this is done, it should work, but you might need to change the order of preference for files to server in apache config file (place .php before .html).

This should all work fine, but if you then decide to continue with apache (I like nginx, but apache is fine), you may want to look into php-fpm. It something you might consider after you get things working and have an interest in newer (better) ways to run it. For a small site, the standard php apache module should be fine.

--
Posted on Rocksolid Light
news.novabbs.org


Subject: Re: index.php for apache2?
From: AnonUser
Newsgroups: rocksolid.shared.helpdesk
Organization: novaBBS
Date: Sat, 14 Nov 2020 19:10 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: AnonU...@novabbs.i2p (AnonUser)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: index.php for apache2?
Date: Sat, 14 Nov 2020 19:10:06 +0000
Organization: novaBBS
Message-ID: <50cacc8c30e74b3c3474ae53d3bbb086$1@www.novabbs.com>
References: <70d8b2abed18130df714ab61ac675f4f$1@www.novabbs.com> <f4aa36b7cd0c6dae532003c651938d09$1@news.novabbs.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="23222"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs
X-Rslight-Site: $2y$10$5RVjqq6EZj0yOvyxO04y0ulIpCNDjfCVFKz/m/13UqwMziJJQGxLq
View all headers
Thanks for your advice, but I don’t exactly know where to change the preference in the apache2.conf file.
--
Posted on novaBBS
www.novabbs.com


Subject: Re: index.php for apache2?
From: AnonUser
Newsgroups: rocksolid.shared.helpdesk
Organization: novaBBS
Date: Sat, 14 Nov 2020 19:12 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: AnonU...@novabbs.i2p (AnonUser)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: index.php for apache2?
Date: Sat, 14 Nov 2020 19:12:38 +0000
Organization: novaBBS
Message-ID: <8a9d94c3d14e323cc525906c25636a29$1@www.novabbs.com>
References: <70d8b2abed18130df714ab61ac675f4f$1@www.novabbs.com> <f4aa36b7cd0c6dae532003c651938d09$1@news.novabbs.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="23535"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs
X-Rslight-Site: $2y$10$NQ1z6ZWPRucCaWWgdQGDcufyZllpd4kbpChGUytYCTXvO67yIXXoW
View all headers
Thanks for your advice, but I don’t exactly know where specifically I have to change the apache2.conf file.
--
Posted on novaBBS
www.novabbs.com


Subject: Re: index.php for apache2?
From: AnonUser
Newsgroups: rocksolid.shared.helpdesk
Organization: novaBBS
Date: Sat, 14 Nov 2020 20:40 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: AnonU...@novabbs.i2p (AnonUser)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: index.php for apache2?
Date: Sat, 14 Nov 2020 20:40:24 +0000
Organization: novaBBS
Message-ID: <5ca1c0d34a4cf46e40851a8947852807$1@www.novabbs.com>
References: <70d8b2abed18130df714ab61ac675f4f$1@www.novabbs.com> <f4aa36b7cd0c6dae532003c651938d09$1@news.novabbs.org> <50cacc8c30e74b3c3474ae53d3bbb086$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="7743"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs
X-Rslight-Site: $2y$10$IHa6588KJPV9OvRimj/30OZRyV0qZENEU1DLCo5eguTZccvi246eu
View all headers
AnonUser wrote:

Thanks for your advice, but I don’t exactly know where to change the preference in the apache2.conf file.

If you have php and libapache2-mod-php installed, and you've enabled mod-php (probably 'a2enmod php'), then it should work. The only change you might need to make is to prioritise .php over .html. If the dir only has index.php, it should serve that automatically, you might just not want to have an index.html in the directory.

Can you serve a .php if you call it directly? Like, http://my.server/index.php?

--
Posted on novaBBS
www.novabbs.com


Subject: check this
From: Anonymous
Newsgroups: rocksolid.shared.helpdesk
Organization: i2pn2 (i2pn.org)
Date: Sun, 15 Nov 2020 01:58 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.shared.helpdesk
Subject: check this
Date: Sat, 14 Nov 2020 17:58:12 -0800
Organization: i2pn2 (i2pn.org)
Message-ID: <he.632.3q8wxd@anon.com>
References: <70d8b2abed18130df714ab61ac675f4f$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="31389"; mail-complaints-to="usenet@i2pn2.org"
View all headers
50438a3c893411ed5d
https://stackoverflow.com/questions/16192049/how-to-make-apache-serve-index-php-instead-of-index-html

--
Posted on def2


1
rocksolid light 0.6.9
clearneti2ptor