创建配置文件

/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>

启用配置

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

监听端口

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

 

相关文章:

  • 2021-06-17
  • 2022-12-23
  • 2021-06-03
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2021-06-25
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案