AWS AMI虚拟主机显示

时间:2017-10-25 12:42:08

标签: apache amazon-ec2 centos httpd.conf vhosts

我尝试通过以下链接创建虚拟主机

Digital Ocean Virtual Host

但是它只使用第一个虚拟主机设置。我尝试了很多教程,但没有任何工作。 最后我把vhost设置放在httpd.conf文件中

Listen 8000
<VirtualHost *:80>
        ServerName  abc.edu
        ServerAlias www.abc.edu
        DocumentRoot /var/www/html/abc/frontend/dist
        <Directory /var/www/html/abc/frontend/dist>
                Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride All
                Order allow,deny
                allow from all

        </Directory>
</VirtualHost>
<VirtualHost *:8000>
        ServerName  apiabc.edu
        ServerAlias www.apiabc.edu
        Alias /static /var/www/html/abc/abc/static
        <Directory /var/www/html/abc/abc/static>
                Require all granted
        </Directory>

        <Directory /var/www/html/abc/abc/abc>
                <Files wsgi.py>
                        Require all granted
                </Files>
        </Directory>

        WSGIDaemonProcess abc python-path=/var/www/html/abc/abc python-home=/var/www/html/abc/env
        WSGIProcessGroup abc
        WSGIScriptAlias / /var/www/html/abc/abc/abc/wsgi.py
</VirtualHost>

0 个答案:

没有答案