Httpd: unrecognizedservice // 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: 23455090 description: Act 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:
## 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. #
Options FollowSymLinks AllowOverride None Order deny,allow Deny from all
Change it
# Allow access to external directories
Options Indexes FollowSymLinks AllowOverride None
Restart httpd.