Configure Apache and virtual hosts in Fedora10

Source: Internet
Author: User
Cause: When the virtual host under Fedora is recently configured, files configured in/home/user/are always inaccessible. view the log prompt. [MonJan1909: 05: 142009] [error] [client127.0.0.1] (13) Permissiondenied, the following is a summary. Summary: Fedora

Cause:
When you configure a virtual host in Fedora recently, files configured in/home/user/cannot be accessed normally. view the log prompts.
[Mon Jan 19 09:05:14 2009] [error] [client 127.0.0.1] (13) Permission denied: access to/denied
It seems that there are still issues with permissions. I found some and finally solved them. The following is a summary.

To sum up the Apache configuration under Fedora10:

1. install apache.
It is now very convenient to install apache under Fedorar. You can use rpm or yum to install apache.

2. install PHP.
This step is also very simple, just yum.

3. Configure the VM.
The VM configuration can be written in httpd. conf or a separate file under/conf. d/. I wrote it in/conf. d/vhost. conf.
  
ServerAdmin cocowool@gmail.com
DocumentRoot/home/cipher/workspace
ServerName www.avnads.cn
ErrorLog logs/www.work.cn-error_log
CustomLog logs/www.work.cn-access_log common
  

4. Set the HOST.
Modify the/etc/hosts file according to your configuration.
Example: 127.0.0.1 www.avnads.cn

5. Configure directory permissions.
The main reason for access failure is the permission problem. directory permission is one aspect. Therefore, you need to set permissions for the working directory.
Su-
Chomd 711/home/cipher
Chmod 755/home/cipher/workspace

6. SELINUX.
I know little about SELinux and have never used SELinux. Therefore, it is disabled directly.
If SELinux is used in the system, you need to set the following two options:
Setseool-P httpd_enbale_homedirs 1
Chcon-R-t httpd_sys_content_t/home/cipher/workspace
Restart the service.
-----------
Some Supplements
[Warn] NameVirtualHost *: 80 has no VirtualHosts
If this error is displayed when apache is started, it means that too many logs are written on NameVirtualHost *: 80. All virtual hosts only need one row.
Finally, we can view the current running status through httpd-S.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.