我想在当前的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
我在这里做什么错了?