Possible Errors During Apache installation and configuration in Centos

Source: Internet
Author: User

Possible Errors During Apache installation and configuration in Centos
Httpd: unrecognized service

// Install apache as the system service cp/usr/local/apache2/bin/apachectl/etc/rc. d/init. d/httpd // then vi/etc/rc. d/init. d/httpd add (#! /Bin/sh) chkconfig: 2345 50 90 description: Activates/Deactivates Apache Web Server // Finally, run chkconfig to add Apache to the startup Service Group of the system: chkconfig -- add httpdchkconfig httpd on // then service httpd start
Httpd: cocould not reliably determine the server's fully qualified domain name
// Open httpd. conf in Notepad // remove the # ServerName localhost: 80 comment in it. // Execute httpd // and then access http: // localhost: 80 through a browser. If "It works!" is displayed on the page !" Indicates that apache has been installed and started successfully.
You don't have permission to access/on this server

It turns out that my VM directory is htdocs under the non-apache installation directory, which violates apache's default permission to access the website root. The default virtual host root directory address of apache is ../Apache Software Foundation/Apache2.2/htdocs. You need to modify the httpd. conf file to direct it to other directories. Inhttpd.confFile to find this section:

<span style="font-size: x-small;">## Each directory to which Apache has access can be configured with respect# to which services and features are allowed and/or disabled in that# directory (and its subdirectories). ## First, we configure the "default" to be a very restrictive set of # features.  #<Directory />    Options FollowSymLinks    AllowOverride None    Order deny,allow    Deny from all</Directory></span>

Change it

<Span style = "font-size: x-small;"> # Allow access to external directories <Directory/> Options Indexes FollowSymLinks AllowOverride None </Directory> </span>

Restart httpd.

Related Article

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.