Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.


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>
share|improve this question
    
what's in your apache's log file at /var/log/httpd/error_log ? –  etagenklo Jul 21 '13 at 7:44

2 Answers 2

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/
share|improve this answer
    
May I know what could be the reason for error Not found, I mentioned first, while I give IP address in my browser ? –  Uvais Ibrahim Jul 21 '13 at 7:02
    
I tried with chmod +x /home/uvais/ also but still it is showing the same Forbidden error. –  Uvais Ibrahim Jul 21 '13 at 7:03

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.