我有一个拥有公共IP的主机。我在上面运行小型Flask应用程序。我的配置如下所示。而不是xx.yy.zz.dd
真实IP。
<VirtualHost *:80>
ServerName xx.yy.zz.dd
ServerAdmin admin@example.com
#DocumentRoot /var/www/myapp
WSGIDaemonProcess myapp user=www-data group=www-data threads=5
WSGIScriptAlias / /var/www/myapp/myapp.wsgi
WSGIScriptReloading On
<Directory /var/www/myapp/myapp/>
WSGIProcessGroup myapp
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
Alias /static /var/www/myapp/myapp/static
<Directory /var/www/myapp/myapp/static/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
问题如下。如何将域添加到Apache2
配置中?
我试图做:
ServerName domain.domain
ServerAlias domain.domain
ServerAdmin admin@example.com
DocumentRoot /var/www/myapp
我还尝试搜索不同的相关答案,但到目前为止没有找到有效的示例。