By elearn
My apache2 installed on the debian8.1. In the configuration file /etc/apache2/apache2.conf
<Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory>
<Directory /usr/share> AllowOverride None Require all granted </Directory>
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
There are lines in the index.html:
The default Debian document root is /var/www/html. You can make your own virtual hosts under /var/www. This is different to previous releases which provides better security out of the box. With phpinfo() to get document root is /var/www.
How to change it into /var/www ?In the /etc/apache2/apache2.conf,it is already <Directory /var/www/>, but in fact the document root is /var/www/html.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You need to edit the site specific config file at this path /etc/apache2/sites-enabled
the file you probably need to edit is 000-default.conf
just change the DocumentRoot from /var/www/html to /var/www/YOUR_DIRECTORY
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.