Apache2虚拟主机子域不起作用

时间:2019-01-21 00:15:11

标签: apache dns apache2 subdomain virtualhost

我的DNS设置如下:

------------------------------------------------
| A Record | panel | 143.44.310.13 | Automatic |
------------------------------------------------
| A Record |  www  | 143.44.310.13 | Automatic |
------------------------------------------------
| A Record |   @   | 143.44.310.13 | Automatic |
------------------------------------------------

我的pterodactyl.conf看起来像这样:

<VirtualHost *:80>
  ServerName panel.domain.com
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
  ServerName panel.domain.com
  DocumentRoot "/var/www/panel/public"
  AllowEncodedSlashes On
  php_value upload_max_filesize 100M
  php_value post_max_size 100M
  <Directory "/var/www/panel/public">
    AllowOverride all
  </Directory>
  SSLEngine on
  SSLCertificateFile /etc/letsencrypt/live/panel.domain.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/panel.domain.com/privkey.pem
</VirtualHost>

但是由于某种原因,该子域无法将我带到/ var / www / panel / public,这绝对是服务器上的位置。

!!!为了安全起见,我已将域更改为domain.com !!!为了安全起见,我已经更改了IP地址

0 个答案:

没有答案