zoukankan      html  css  js  c++  java
  • Ubuntu18.4中Apache在加不同端口的虚拟主机


    1.添加监听端口

    sudo vim /etc/apache2/ports.conf


    Listen 80
    Listen 6080
    <IfModule ssl_module>
             Listen 443
    </IfModule>

    <IfModule mod_gnutls.c>
             Listen 443
    </IfModule>


    2.添加虚拟主机配置

    sudo vim /etc/apache2/sites-available/gisas.conf


    <VirtualHost *:6080>

            #ServerName www.example.com

            ServerAdmin webmaster@localhost
             DocumentRoot /var/www/html

           <Directory /var/www/html>
                       Options Indexes FollowSymLinks MultiViews
                       AllowOverride None
                       Order allow,deny
                       allow from all
             </Directory>

            #Rewrite
             RewriteEngine On


             ErrorLog ${APACHE_LOG_DIR}/error-gisas.log
             CustomLog ${APACHE_LOG_DIR}/access-gisas.log combined

            WSGIDaemonProcess gisas user=my group=my threads=5
             WSGIScriptAlias / /var/www/apps/gisas/gisas.wsgi
             <Directory "/var/www/apps/gisas/">
                 WSGIProcessGroup gisas
                 WSGIApplicationGroup %{GLOBAL}
                 Order allow,deny
                 Allow from all
             </Directory>


    </VirtualHost>
    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet


    3.应用虚拟主机配置

    sudo a2ensite gisas


    4.重启服务

    sudo systemctl restart apache2

  • 相关阅读:
    python 2
    Python 1 practice
    python 1
    Python多线程_笔记
    背景自适应不会随浏览器界面放大速效而改变
    平行四边形定理
    动态规划3(区间+树形)
    素数快速生成
    设CPU共有16根地址线,8根数据线,,,
    贪心+huffman编码+模拟退火+分治
  • 原文地址:https://www.cnblogs.com/gispathfinder/p/10615462.html
Copyright © 2011-2022 走看看