Ubuntu under the Apache Web server operating manual deployment

Ubuntu deployed under Apache Web server operating manual

  1. installation

    sudo apt install apache2 –y

  2. Change setting

    All default configuration file is read-only, you need to modify operating permissions to modify:

    sudo chmod 777 [filename]

    Modify / etc / apache2 000-default.conf files under / sites-available path DocumentRoot / var / www / to the desired directory:

     

    Modify / etc ports.conf file in / apache2 path Listen 80 to the desired port, such as 8888:

     

    Modify / apache2.conf file in the etc / apache2 path access authorization:

     

  3. Open, close and restart the server

    sudo /etc/init.d/apache2 start // start the Apache service

    sudo /etc/init.d/apache2 stop // stop the Apache service

    sudo /etc/init.d/apache2 restart or sudo apache2ctl -k restart // restart the Apache service

  1. Verify apache is configured successfully

    Browser input http://192.168.70.43:8888/ , the following picture appears then prove successful configuration

     

  2. Verify access control permissions are set to take effect:

     

Guess you like

Origin www.cnblogs.com/huojinfeng/p/12076880.html