Results 1 to 7 of 7

Thread: Apache update broke my web server

  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas
    Beans
    54
    Distro
    Ubuntu 10.04 Lucid Lynx

    Apache update broke my web server

    Hi everyone,

    I recently did an apache2 update (now running 2.2.22) and my web-server stopped being accessible. I can still access phpmyadmin, and my mumble-django setup - but my acutal website setup in my sites-available is no longer available. All I get is a "Forbidden, You don't have permission to access / on this server". It was working 100% before the update, and I made no permission changes to the files in my public_html directory. I tried 'chmod -R 755 public_html' but that did no good. Any advice on how to fix this? I've checked the apache log files and there is nothing out of the ordinary so I suspect is has to do with the update.

    Upon further inspection I'm getting this error for the website in question:
    [Sat Jun 02 00:39:02 2012] [error] [client 180.76.5.187] (13)Permission denied: access to /index.php denied
    I checked all of the permissions and they look ok:
    bob@Newton:~$ namei 1TBRaid/Web/trtguild.net/public_html/index.php -m
    f: 1TBRaid/Web/trtguild.net/public_html/index.php
    drwxr-xr-x 1TBRaid
    drwxr-xr-x Web
    drwxr-xr-x trtguild.net
    drwxr-xr-x public_html
    -rwxr-xr-x index.php
    bob@Newton:~$
    Any idea what may be going on? Again everything was working 100% before the update =(
    Last edited by mons00n; June 2nd, 2012 at 08:57 AM.

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas
    Beans
    54
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Apache update broke my web server

    I can get the webserver to work in /var/www, so does that mean that the owner of my site files HAS to be root as is the case for /var/www? Is this a recent change? And how can I link to my files without having to change the owner of all of the parent folders to root?

    I just tried to make a new site in my home directory via this link, but I encounter the same permission error. Any help would be greatly appreciated.

  3. #3
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,630
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Apache update broke my web server

    Please post the vhost file in question.

    Look for the directory directives. Possibly the directory is restricted.


    Code:
        <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/site1/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all
            </Directory>
    Particularly the "allow from all" and "order allow,deny" for the directory containing the index.html.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  4. #4
    Join Date
    Dec 2007
    Location
    Gainesville, Florida
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Apache update broke my web server

    Just a little late. what volkswagner said.

  5. #5
    Join Date
    Sep 2010
    Location
    Las Vegas
    Beans
    54
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Apache update broke my web server

    Quote Originally Posted by volkswagner View Post
    Please post the vhost file in question.

    Look for the directory directives. Possibly the directory is restricted.


    Code:
        <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /var/www/site1/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all
            </Directory>
    Particularly the "allow from all" and "order allow,deny" for the directory containing the index.html.
    Thanks for the replies guys. As a test I simply copied the default website and only changed the directories and port (my ISP blocks 80). My site file looks as follows:
    <VirtualHost *:81>
    ServerAdmin webmaster@localhost

    DocumentRoot /home/bob/webtemp
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /home/bob/webtemp/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    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

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    </VirtualHost>
    which inside of that directory is a simple index.html file. It's the only site enabled and I still get a permission error. Any other ideas?

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,299
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Apache update broke my web server

    What are the permissions on /home/bob? They must be at least 711 so that the Apache user, www-data, can see your site. /home/bob/webtemp needs either 755 permissions, or 750 permissions if it belongs to a group with the www-data user as one of its members. The first is easier to administer.

  7. #7
    Join Date
    Sep 2010
    Location
    Las Vegas
    Beans
    54
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Apache update broke my web server

    Quote Originally Posted by SeijiSensei View Post
    What are the permissions on /home/bob? They must be at least 711 so that the Apache user, www-data, can see your site. /home/bob/webtemp needs either 755 permissions, or 750 permissions if it belongs to a group with the www-data user as one of its members. The first is easier to administer.
    The thing is, I didn't change any permissions =( I checked those directories and they are good. I think im going to try and reinstall apache and if that doesn't work just start from scratch. Something weird is going on.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •