DigitalOcean-具有IP地址的同一Droplet上的域和子域(apache2服务器)

我想在当前的Droplet中添加子域,但是到目前为止我还没有运气。我目前没有网域,只有IP。目前,我在 sites-available

中有2个配置文件

主站点配置:                                                                                                     000-default.conf

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/main/public

        <Directory /var/www/html/main/public>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

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

        <IfModule mod_dir.c>
            DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
        </IfModule>

</VirtualHost>

子域配置: slider.conf

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/slider
        ServerName slider.1234.123
        ServerAlias www.slider.1234.123    
        <Directory /var/www/html/dev.dushan887mob3.com>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

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

        <IfModule mod_dir.c>
            DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
        </IfModule>

</VirtualHost>

我已将DNS记录添加到IP地址:

slider.1234.123 directs to 1234.123

我在这里做什么错了?

yqfjh 回答:DigitalOcean-具有IP地址的同一Droplet上的域和子域(apache2服务器)

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3042066.html

大家都在问