Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

cant change Default Index.html

Hello everyone,
I have Lamp installed on a VPS,
I want to change the default index.html to index.php but no success.
Here is my Default.conf setting for Apache2
Code
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mysite.com
ServerAlias http://www.mysite.com
DocumentRoot /var/www/domains/mysite.com
DirectoryIndex index.php
CustomLog /var/www/logs/mysite.com.log combined
ErrorLog /var/www/error_logs/mysite.com.log
<Directory /var/www/domains/mysite.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

I also tried to redirect index.html to index.php via .htaacc via 301 redirect

Code
redirect 301 /index.html http://www.mysite/index.php
but it has no effect.

can you guys tell me what is forcing Apache to load index.html ?
Criticizing someone's spelling or grammar on the internet is the last refuge of someone who doesn't have an argument.
(Jan 31, 2017 09:58 AM)Warrioя Wrote:  Hello everyone,
I have Lamp installed on a VPS,
I want to change the default index.html to index.php but no success.
Here is my Default.conf setting for Apache2
Code
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mysite.com
ServerAlias http://www.mysite.com
DocumentRoot /var/www/domains/mysite.com
DirectoryIndex index.php
CustomLog /var/www/logs/mysite.com.log combined
ErrorLog /var/www/error_logs/mysite.com.log
<Directory /var/www/domains/mysite.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

I also tried to redirect index.html to index.php via .htaacc via 301 redirect

Code
redirect 301 /index.html http://www.mysite/index.php
but it has no effect.

can you guys tell me what is forcing Apache to load index.html ?

Do
Code
sudo nano /etc/apache2/mods-enabled/dir.conf

and move index.php to before index.html
(Jan 31, 2017 01:30 PM)AshleyUK Wrote:  Do
Code
sudo nano /etc/apache2/mods-enabled/dir.conf

and move index.php to before index.html

Already did that.. I removed the index.html from there.
There is only index.php.


still looking for help,
thank you guys
Criticizing someone's spelling or grammar on the internet is the last refuge of someone who doesn't have an argument.
Modify your 'httpd.conf' if you want to achieve this, I did a quick Google search and pulled a StackOverflow article.
http://image.prntscr.com/image/37c4dfe7b...e5794b.png
[Image: BQ6bF1l.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Wordpress] by skullNov 30, 2019 05:30 AM 1 124 Nov 30, 2019 05:30 AM
Last Post: Linux X
[Wordpress] by StarUhmJun 4, 2017 03:47 PM 1 205 Jun 4, 2017 03:47 PM
Last Post: TonyPD
by priluxDec 10, 2016 11:18 AM 1 236 Dec 10, 2016 11:18 AM
Last Post: VirtualFrost