Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

You don't have permission to access / on this server

Tags:

apache

centos6

I have CentOS 6.1 server and I installed apache 2.2.15 on it. Now When I try to access it from another pc (windows 7) from IE (http:/// (=centos ip)) I get the "You don't have permission to access / on this server." error. I even created phpinfo.php file with content of "" on "var/www/html" and when I try to access it by using "http://*/phpinfo.php" in IE, I get not found error. What should I do? my httpd.conf for directiry is like this:

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
like image 203
Ehphan Avatar asked Jul 03 '13 07:07

Ehphan


People also ask

How do you fix you don't have permission to access on this server on Mac?

If you don't have permission to open a file or folder, you may be able to change the permissions settings. On your Mac, select the item, then choose File > Get Info, or press Command-I. Click the arrow next to Sharing & Permissions to expand the section.

Why does it say access denied on this server?

“Access Denied, you don't have permission to access (URL) on this server.” It prevents you from opening some specific websites on your browser. There could be several reasons behind this error like the server being taken down, VPN access could be blocked on that server, etc.

How do I get rid of access denied on Google Chrome?

Open Chrome browser > click on 3-dots menu icon > hoover mouse over More Tools and click on Clear Browsing Data option. 2. On the next screen, select Browsing History, Cookies, Cached Images and click on Clear Data button. After clearing browsing History and Cache, see if the problem is resolved.


1 Answers

Edit httpd.conf file, which is in /etc/httpd/conf/httpd.conf. Add the below code.

<Directory "/">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride None
Allow from all
</Directory>

<Directory "/home/">
 #Options FollowSymLinks
 Options Indexes FollowSymLinks Includes ExecCGI
 AllowOverride None
 Allow from all
</Directory>

After the line no. 555 (in my case) . Check for the file permissions and restart the server.

service httpd restart   

Now, it will work . Still you are facing the same problem, disable the seLinux in /etc/selinux/config change SELINUX=disabled and restart the server as mentioned above and try it.

Hope this helps

like image 109
Reddi Rajendra P Avatar answered Sep 22 '22 14:09

Reddi Rajendra P