-1


I am very beginner to system and network administration and I researched a lot on this problem, but still not sloved! I have an Ubuntu machine in which I installed cent Os 6 as a virtual machine. I turned of SE Linux and flushed out the firewall rules on cent OS.Until last day there was no any issues with apache server which runs on cent os machine. 10.3.2.0 is my cents Os virtual machine's IP address.Now when I try to access the default Apache web page by entering this IP in my host machine's browser, it is showing the given below error:

Not Found
The requested URL / Not found on this server.
Apache/2.2.15 (CentOS) Server at 10.3.2.0 Port 80

When I configure a virtual host and try to access via browser from my host machine it is showing the below error:

Forbidden
You don't have permission to access / on this server.
Apache/2.2.15 (CentOS) Server at uvais.qbc.uws Port 80

What could be the problem ? Please assist me as I am very beginner. My virtual host Document root has permission 770 and ownership to both users, root and apache.

This is my uvais.qbc.uws configuration file inside /etc/httpd/conf.d:

<VirtualHost *:80>
    ServerName uvais.qbc.uws
    DocumentRoot /home/uvais/public_html/uvais
    DirectoryIndex index.html
            <Directory /home/uvais/public_html/uvais>
                    Options -Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all

                    AuthUserFile /home/uvais/.htpasswd
                    AuthName "Authentication required !"
                    AuthType Basic
                    Require valid-user
            </Directory>
</VirtualHost>
Roald Nefs
  • 426
  • 5
  • 13
Uvais Ibrahim
  • 11
  • 1
  • 3

2 Answers2

0

Generally this means /home/uvais has the wrong permissions. It's probably 700 which means the apache user can't cd into it

Try the following

chmod +x /home/uvais/
Mike
  • 21,910
  • 7
  • 55
  • 79
0

If your intention is to publish contents inside a user home directory, what you need to do is use the appropriate module for this task: mod_userdir.

Pay special attention to the security tips explained there and make sure you disable access to the root user public directory.

dawud
  • 14,918
  • 3
  • 41
  • 61