Alibabacloud.com offers a wide variety of articles about how to restart httpd service in linux, easily find your how to restart httpd service in linux information here online.
will prompt: XXX The service does not support Chkconfig. So we first edit the httpd script, and in line 2nd (#!/bin/sh below) Add the following comment information (including #):# chkconfig: 35 61 61# description: ApacheThe 3 parameters for the first line are: at which RunLevel, start httpd (3,5), start sequence number (S61), and close ordinal (K61). Note: The d
In order to achieve a highly available based on the Apache web site environment, in Apache for a variety of reasons automatically stop running, want to immediately restore site access, this requires a tool to monitor the operation of Apache real-time and can automatically restart the HTTPD service, on the Internet to find relevant information, Rewrite the followi
When a K connection is applied, the Stop parameter is applied accordingly; when the S connection is applied, the Start parameter is applied accordingly. There is one exception. The slink in the rc0.d and rc6.d directories will not start any service. They are called with the stop parameter to end some services. The logic behind this is that when you are about to shut down or restart, you don't want to start
/etc/init.d/xxx Start |Stop | Restart
/ETC/INIT.D/HTTPD Reload
Advantages: No need to find the PID of the process
/ETC/INIT.D/HTTPD restart
Close and reopen
There are many such as RC under the/etc. D's directory, which has many symbolic links. Here,? refers to the running level corresponding to the number and RCSYSINIT
/vhost/www1ServerName www1.magedu.comCustomLog/var/log/httpd/www1/aceess_log commonErrorLog/var/log/httpd/www1/err_log # create the log file path by yourself. Otherwise, the service fails to be started.Options NoneAllowOverride NoneOrder allow, denyDeny from 192.168.1.0 ### no host in the current 192.168.1.0 segment can access www1
SetHandler server-statusOrder a
In the afternoon when the site on AWS EC2 is inaccessible, and the IP is accessible, login to SSH and view the service Service--status-all Discover that the HTTPD service is stopped, and then try to start httpd, prompt: Starting httpd
Linux Automatic Restart service and Linux Restart service
The apache and mysql services are automatically restarted on a regular basis without restarting the server. The procedure is as follows:I. Restart apache and mysql services at and every day[Root @ www bin] # cd/opt/[
prefork:一次一个进程响应一个请求worker:一个进程生成多个线程,一个线程响应一个请求event:基于事件驱动,一个进程响应多个请求
4.HTTPD Self-brought tool program
Tools
function
htpasswd
Basic Authentication in the file implementation, the use of the Account password generation tool
Apachectl
HTTPD comes with a service control script that supp
source code:
Modify the Code include/http_config.h and add it to the file header.
#ifndefBIG_SECURITY_HOLE#defineBIG_SECURITY_HOLE#endifRe-compile:
[root@localhost httpd-2.4.10]# ./configure --prefix=/usr/local/httpd --enable-ssl --enable-cgi --enable-mods-shared=allable-ssl --enable-cgi --enable-mods-shared=all --enable-track-vars --enable-rewrite
3. modify the configuration file and
format for a virtual directory:Alias/test "/opt/test/" #别名,/test =/opt/test (site storage) add test when visiting the websiteOptions Indexes multiviews followsymlinks #建立索引, fixed formatallowoverride None #不允许重写 (fixed format)AuthName "Hello" #hello信息AuthType Basic #认证类型 Basic is one of the most fundamental certificationsAuthuserfile/etc/httpd/user #身份验证登陆 and specify the file seat#authgroupfile/etc/httpd/
, company) [Default company Ltd]:ymOrganizational Unit Name (eg, section) []:opsCommon name (eg, your name or your server ' s hostname) []:www2.a.comEmail Address []:[email protected][email protected] ssl]# CP httpd.csr/testdir/3.CA issue the certificate and send the certificate to the requestor[email protected] ssl]# OpenSSL CA-IN/TMP/HTTPD.CSR-OUT/ETC/PKI/CA/CERTS/HTTPD.CRT[Email protected] ssl]# cp/etc/pki/ca/certs/httpd.crt/etc/httpd/ssl/4. Instal
箱 Please enter the following ' extra ' attributes to be sent with your certificate request A Challe nge Password []: #默认 a optional company name []: #默认 # [Root@linuxprobe certs]# OpenSSL x509-in server.csr-out server . crt-req-signkey server.key-days 3650 Signature OK subject=/c=cn/st=shanghai/l=shanghai/o=linuxprobe/ou=devops/cn=
linuxprobe.org/emailaddress=root@linuxprobe.org getting Private Key
X. Configuring SSL
[1] Configure SSL.
[Root@linuxprobe ~]# yum-y Install mod_ssl
[ro
When the Apache Boot httpd service is installed, httpd:could not reliably determine the server's fully qualified domain name, using XXX for Serverna MeFind a lot of information on the Internet, called Modify the httpd/conf/httpd.conf configuration file installed in the Apache root directory1. Open apache_home/httpd/con
=650; "src=" Https://s3.51cto.com/wyfs02/M01/06/C8/wKiom1m-WzyggPqEAABugYd6_XM531.png "style=" float : none; "title=" Qq20170917191603.png "alt=" Wkiom1m-wzyggpqeaabugyd6_xm531.png "/>3, Chkconfig--add httpd Add script to boot list, but it is not running boot4, because we do not specify in which mode the HTTPD service script is running, you can set it here, for e
salt ' * ' pillar.items//view pillar (Dynamic Info) Salt-key//view clients that have been acceptedDeploy Saltstack and Bulk install httpd service deployment Saltstack and bulk install HTTPD services??Saltstack Configuration Management installation ApacheNote: ' * ' means all clients execute Apache moduleVim/srv/salt/top.slsBase‘*‘:
ApacheDeploy Saltstac
How to start the httpd service under Linux
See if native Linux has httpd installed
See where the httpd command is placed
by command
cat/etc/httpd/conf/httpd.conf | More
To view the contents of the httpd.conf configuration file
Here's the DocumentRoot "/var/www/html."
This problem occurs when you use automatic compilation and installation, that is, input # servicehttpdrestart to give such a prompt; at this time, you can restart # usrlocalapache2binapachectlstart. If you want to use # servicehttpdrestart, note that this problem occurs when daemonusrlocalapache2binapac is automatically compiled and installed.
# ServiceHttpdRestart
This prompt is provided. You can restart t
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.