MasterSub Posted January 30, 2020 Posted January 30, 2020 (edited) hello friends i achieved by a fluxcp by vps but does not load the helo me I don't know what to do here, the fluxcp ask for version 5.2.1 or higher, mine is 7.2.14 my fluxcp index norma when I enter index.php Edited January 30, 2020 by MasterSub
0 HaARiZz Posted January 30, 2020 Posted January 30, 2020 What is the web server that you used? Apache? nginx? To solve your problem on the issue of index.php files not being served as the default file (aka the DirectoryIndex). APACHE To fix the issue with Apache web server, you will need to tell it that “index.php” files should be treated the same as “index.html” files. A quick fix is to create a .htaccess file with the following line: #The DirectoryIndex is index.php DirectoryIndex index.php index.html However, using .htaccess files should be avoided if you happen to have access to Apache configuration files. A better approach is to modify the /etc/httpd/conf/httpd.conf file and add index.php after DirectoryIndex as per below: #Find "DirectoryIndex" add "index.php" before index.html DirectoryIndex index.php index.html In the config snippet above, we tell Apache that index.php is the DirectoryIndex. We also specify that index.html should be used as the DirectoryIndex if a index.php file is not present inside the current directory. After this, restart the Apache web server in order for your changes to be recognized. Do this by typing this: sudo systemctl restart httpd NGINX If you are using PHP-FPM with nginx as the web server, then you will need to make sure that your sites-available configuration file has something similar to the following: location / { index index.php index.html index.htm; try_files $uri $uri/ =404; } You only need to pay attention to the second line, as the rest of the configuration settings may be slightly different than what you are currently using. In the configuration snippet above, we have told our nginx web server that the index is “index.php”, “index.html” or “index.htm” – in that order of preference. After this, restart the nginx web server in order for your changes to be recognized. Do this by typing this: sudo systemctl restart nginx
0 rayleigh Posted November 25, 2022 Posted November 25, 2022 On 1/30/2020 at 7:43 PM, HaARiZz said: What is the web server that you used? Apache? nginx? To solve your problem on the issue of index.php files not being served as the default file (aka the DirectoryIndex). APACHE To fix the issue with Apache web server, you will need to tell it that “index.php” files should be treated the same as “index.html” files. A quick fix is to create a .htaccess file with the following line: #The DirectoryIndex is index.php DirectoryIndex index.php index.html However, using .htaccess files should be avoided if you happen to have access to Apache configuration files. A better approach is to modify the /etc/httpd/conf/httpd.conf file and add index.php after DirectoryIndex as per below: #Find "DirectoryIndex" add "index.php" before index.html DirectoryIndex index.php index.html In the config snippet above, we tell Apache that index.php is the DirectoryIndex. We also specify that index.html should be used as the DirectoryIndex if a index.php file is not present inside the current directory. After this, restart the Apache web server in order for your changes to be recognized. Do this by typing this: sudo systemctl restart httpd NGINX If you are using PHP-FPM with nginx as the web server, then you will need to make sure that your sites-available configuration file has something similar to the following: location / { index index.php index.html index.htm; try_files $uri $uri/ =404; } You only need to pay attention to the second line, as the rest of the configuration settings may be slightly different than what you are currently using. In the configuration snippet above, we have told our nginx web server that the index is “index.php”, “index.html” or “index.htm” – in that order of preference. After this, restart the nginx web server in order for your changes to be recognized. Do this by typing this: sudo systemctl restart nginx Sorry for bumping this one. Im using apache2 but i cant find where to put the directoryindex.
0 KazumaSatou Posted November 25, 2022 Posted November 25, 2022 1 hour ago, rayleigh said: Sorry for bumping this one. Im using apache2 but i cant find where to put the directoryindex. You just need to create .htaccess file where your index.php found.
Question
MasterSub
hello friends i achieved by a fluxcp by vps but does not load the helo me I don't know what to do here, the fluxcp ask for version 5.2.1 or higher, mine is 7.2.14
my fluxcp
when I enter index.php
3 answers to this question
Recommended Posts