Home  >  Article  >  Backend Development  >  CentOS configuration PHP appears You dont have permission to access on this serve

CentOS configuration PHP appears You dont have permission to access on this serve

WBOY
WBOYOriginal
2016-08-08 09:30:081343browse

When configuring the PHP environment before, I entered http://192.168.1.124/index.php

I encountered the problem You don't have permission to access on this server

I searched on the Internet There was a lot of information, some said it was due to selinux, just turn it off (it didn’t work at all!),

Later, I found the description of this article:

******* ****************Dividing Line******************************

"

Error when running PHP program in CentOS5.3+MySQL 5.0.45+Apache2.2.3 +PHP5.1.6

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

installation After installing apache+php+mysql,

Copy a copy of phpmyadmin and run it and an error occurs:

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

Some people say Just turn off selinux

I discovered the reason and method:

Because the permission to execute the website generally requires the permission of Read from all httpd scripts and the daemon

When the folder is decompressed in the system,

We do not have this permission. You need to create a new directory under html/ (it will automatically be divided into Read from all httpd scripts and the daemon permissions)

Then copy the file and put it in (note not to cut it, I directly compressed the package before) It won’t work if you unzip it! )

Let’s try it out by running it

CentOS5.3+MySQL 5.0.45

+Apache2.2.3 +PHP5.1.6 (all come with the system)

Welcome to join my official account. ->Men who get kicked love to learn


The above introduces the issue "You don't have permission to access on this serve" when configuring PHP on CentOS, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn