Apache security loading and unloading basic commands and Apache file structure

Source: Internet
Author: User

First, win under the basic command (CMD, Apache installation directory execution):
  Installation Services:httpd-k install-n Service Name
  Uninstall Service:SC Delete Service name
 Start service:httpd start
  Restart Service:httpd restart
  stop service:httpd-k shutdwn


Second, the Linux system Environment command:
1. Start Apache 2 Server/start Apache service
    #/etc/init.d/apache2 Start
Or
$ sudo/etc/init.d/apache2 Start

2. Restart Apache 2 Server/restart Apache service
    #/etc/init.d/apache2 Restart
Or
$ sudo/etc/init.d/apache2 Restart

3. Stop Apache 2 Server/stop Apache Service
    #/etc/init.d/apache2 Stop
Or
$ sudo/etc/init.d/apache2 Stop

Third, some basic configuration of Apache:

The service needs to listen on a port, for example: MySQL (3306), Oracle (1521), MSSQL (1433), FTP (21), SSH (22)
Apache this Web service by default on port 80 listening ...

  Ports (port):
1. One machine can have 1~65535 port
2. In practical development, we often use
Netstat–an
Netstat–anb

To see which ports on the machine are listening, and if an abnormal port is detected, you can close the port.
By changing the command we can find out which program is listening on that port and thus shutting it down.

3. One of the 80 ports is monitored by Apache, then the port can no longer be monitored by other applications. (a port can only be monitored by one program).
4. The port is divided into the famous port 1-1024, other ports can be assigned by themselves.

  How Apache goes to configure ports
Apache software configuration is configured in the httpd.conf file, the file is in the Apache installation directory of the Conf
In the httpd.conf file we modify the port: Listen 81
Note: After modifying, be sure to restart Apache

Four, Apache package file structure:
Bin: folder where executable files are located
Conf:apache configuration file
Htdocs: initial site Folder
The Moduls:apache module is located

Apache security loading and unloading basic commands and Apache file structure

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.