Thread View: rocksolid.shared.helpdesk
11 messages
11 total messages
Started by AnonUser@novabbs
Sat, 14 Nov 2020 02:43
index.php for apache2?
Author: AnonUser@novabbs
Date: Sat, 14 Nov 2020 02:43
Date: Sat, 14 Nov 2020 02:43
3 lines
482 bytes
482 bytes
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
Re: index.php for apache2?
Author: AnonUser@novabbs
Date: Sat, 14 Nov 2020 10:15
Date: Sat, 14 Nov 2020 10:15
16 lines
1418 bytes
1418 bytes
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
check this
Author: Anonymous
Date: Sat, 14 Nov 2020 17:58
Date: Sat, 14 Nov 2020 17:58
4 lines
142 bytes
142 bytes
>>50438a3c893411ed5d https://stackoverflow.com/questions/16192049/how-to-make-apache-serve-index-php-instead-of-index-html -- Posted on def2
Re: index.php for apache2?
Author: AnonUser@novabbs
Date: Sat, 14 Nov 2020 19:10
Date: Sat, 14 Nov 2020 19:10
3 lines
145 bytes
145 bytes
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
Re: index.php for apache2?
Author: AnonUser@novabbs
Date: Sat, 14 Nov 2020 19:12
Date: Sat, 14 Nov 2020 19:12
3 lines
147 bytes
147 bytes
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
Re: index.php for apache2?
Author: AnonUser@novabbs
Date: Sat, 14 Nov 2020 20:40
Date: Sat, 14 Nov 2020 20:40
10 lines
575 bytes
575 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads