Apache2.4 新virtualhost

 2023-02-25    344  

创建配置文件

/etc/apache2/sites-available# sudo nano mysite.conf
<VirtualHost *:8000>
  #ServerName hello.djangoserver
  DocumentRoot /www2
  <Directory /www2> 
    #DirectoryIndex testMain.html
    Options Indexes FollowSymLinks
    Require all granted
  </Directory>
</VirtualHost>

启用配置

Apache2.4 新virtualhost

cd /etc/apache2/sites-available
sudo a2ensite mysite
sudo service apache2 reload

监听端口

cd /etc/apache2
sudo nano ports.conf
Listen 8000

 

以上所述是小编给大家介绍的Apache2.4 新virtualhost,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对77isp云服务器技术网的支持!

原文链接:https://77isp.com/post/34395.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。