Apache start stop

Source: Internet
Author: User
Tags fully qualified domain name

[Root @ dbsvr01 E] # service httpd status
Httpd is stopped
[Root @ dbsvr01 E] # apachectl start
Httpd: cocould not reliably determine the server's fully qualified domain name, using 168.168.80.8 for servername
[Root @ dbsvr01 E] # Vim/etc/hosts
[Root @ dbsvr01 E] #

[Root @ dbsvr01 E] # apachectl start
Httpd: cocould not reliably determine the server's fully qualified domain name, using 168.168.80.8 for servername
[Root @ dbsvr01 E] # Vim/etc/hosts
[Root @ dbsvr01 E] # apachectl-K start
Httpd: cocould not reliably determine the server's fully qualified domain name, using 168.168.80.8 for servername
Httpd (PID 1733) already running
[Root @ dbsvr01 E] # service httpd start
Starting httpd:
[Root @ dbsvr01 E] # service httpd status
Httpd (PID 1733) is running...
[Root @ dbsvr01 E] #

[Root @ dbsvr01 E] # service httpd restart
Stopping httpd: [OK]
Starting httpd: cocould not reliably determine the server's fully qualified domain name, using 168.168.80.8 for servername
[OK]
[Root @ dbsvr01 E] #

 

(Httpd.exe: cocould not reliably determine the server's fully qualified domain name, using 192.168.1.111 for servername)
This is because DNS is not configured. If you do not want to configure DNS, add servername localhost: 80 at the beginning of httpd. conf.

 

[Root @ dbsvr01 E] #/usr/sbin/apachectl-K stop
Httpd: cocould not reliably determine the server's fully qualified domain name, using 168.168.80.8 for servername
[Root @ dbsvr01 E] # service httpd status
Httpd dead but subsys locked
[Root @ dbsvr01 E] # service httpd restart
Stopping httpd: [failed]
Starting httpd: cocould not reliably determine the server's fully qualified domain name, using 168.168.80.8 for servername
[OK]
[Root @ dbsvr01 E] # I

[Root @ dbsvr01 E] #/usr/sbin/apachectl help
Usage:/usr/sbin/httpd [-D name] [-d directory] [-F file]
[-C "directive"] [-c "directive"]
[-K start | restart | graceful-Stop | stop]
[-V] [-V] [-H] [-L] [-L] [-T] [-S]
Options:
-D name: Define a name for use in <ifdefine Name> directives
-D directory: specify an alternate initial serverroot
-F file: specify an alternate serverconfigfile
-C "directive": Process directive before reading config files
-C "directive": Process directive after reading config files
-E level: Show startup errors of level (see loglevel)
-E file: log startup errors to file
-V: Show version number
-V: Show compile settings
-H: List available command line options (this page)
-L: list compiled in Modules
-L: List available configuration directives
-T-D dump_vhosts: Show parsed settings (currently only vhost settings)
-S: a synonym for-T-D dump_vhosts
-T-D dump_modules: show all loaded modules
-M: a synonym for-T-D dump_modules
-T: Run syntax check for config files
[Root @ dbsvr01 E] #

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.