Note that there are some explanatory texts on larger screens.

plurals
  1. POApache2 virtualhost 403 forbidden?
    primarykey
    data
    text
    <p>I'm running ubuntu 13.04 64bit on my desktop, I installed Apache2, MySQL and PHP etc.</p> <p>I wanted to have my web root in <code>/home/afflicto/public_html</code> instead of <code>/var/www</code>. So I went along with this guide:<br> <a href="http://www.maketecheasier.com/install-and-configure-apache-in-ubuntu/2011/03/09" rel="nofollow noreferrer">http://www.maketecheasier.com/install-and-configure-apache-in-ubuntu/2011/03/09</a><br> (I did everything from "configuring different sites") as I like the solution more.</p> <p><strong>Here's what I did:</strong><br> Installed Apache2, MySQL etc..<br> copied <code>/etc/apache2/sites-avaliable/default</code> to <code>/etc/apache2/sites-available/afflicto</code>. Then edited it, it now looks like the following:</p> <p><strong>/etc/apache2/sites-available/afflicto</strong> </p> <pre><code>&lt;VirtualHost *:80&gt; ServerAdmin webmaster@localhost DocumentRoot /home/afflicto/public_html &lt;Directory /&gt; Options FollowSymLinks AllowOverride None &lt;/Directory&gt; &lt;Directory /home/afflicto/public_html/&gt; Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all &lt;/Directory&gt; ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ &lt;Directory "/usr/lib/cgi-bin"&gt; AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all &lt;/Directory&gt; ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined &lt;/VirtualHost&gt; </code></pre> <p>I did <code>sudo a2dissite default &amp;&amp; sudo a2ensite afflicto &amp;&amp; sudo service apache2 restart</code> </p> <p>I created a <code>index.php</code> and <code>index.html</code> in <code>/home/afflicto/public_html/test/</code><br> when accessing <code>localhost/test</code> or <code>localhost/test/index.html</code> etc, I get 403 forbidden error. </p> <p>What am I doing wrong? thanks in advance.</p> <p><strong>update 1</strong><br> I have set the owner of the public_html directory to <code>www-data</code>.<br> Also <code>sudo chmod -R +x public_html &amp;&amp; sudo chmod -R 777 public_html</code><br> Still same 403 error.</p> <p>Here's the output of the apache error log: </p> <pre><code>[Sun Jul 14 06:10:32 2013] [error] [client 127.0.0.1] (13)Permission denied: access to / denied [Sun Jul 14 06:10:32 2013] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload