apache - Changing root directory in apache2 is giving 403 Forbidden error -


Although there are so many similar questions but I could not fix my problem with them. I have installed in Apache / 2.4.7 (Ubuntu) My Ubuntu (14.04) . I changed the two configuration files to change the / home / name / www DocumentRoot to apache to / var / www Given . The files I have changed are /etc/apache2/apache2.conf and /etc/apache2/sites-available/000-default.conf . put in apache2.conf

  & lt; Directory / home / name / www & gt; Option Index Allow follow-up simlinks Override no need All necessary & lt; / Directory & gt;  

and changed to 000-default.conf ,

  DocumentRoot / home / name / www  < 

drwxr-xr-x3 www-data www-data www

code>

But when I If I try to reach localhost from the browser, then I do not have permission to to access this server. What error am I missing?

to apache change the default root directory / var / www to / home / The following changes have worked for me, I have edited the following value of the file like etc / apache2 / apache2.conf . To keep a backup of the original before editing the file This is a good practice.

  & lt; Directory / & gt; Option to allow follow-up Simon link & lt; / Directory & gt; & Lt; Directory / usr / share & gt; Allow override is not necessary for all necessary & lt; / Directory & gt; & Lt; Directory / home / & lt; Username & gt; / Www & gt; Follow Option Index SymLinks Allow Multiviz; Override Do not Permit Any Orders, Deny All To Allow & lt; / Directory & gt;  

Then I changed the /etc/apache2/sites-available/000-default.conf file to DocumentRoot .

DocumentRoot / home / & lt; Username & gt; / Www>

Then restart Apache server,

  sudo service apache2 restart  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -