apache AWS子域之一不工作,具有dev的子域(dev.example.com)不工作

hs1rzwqc  于 2023-05-18  发布在  Apache
关注(0)|答案(1)|浏览(146)

我创建了两个子域www.example.com和www.example.com,www.example.com工作正常,但www.example.com不工作。test.xxxxxx.com and dev.xxxxxx.com, test.xxxxxx.com is working fine but the dev.xxxxxx.com is not working.
dev.xxxxxx.com 一样的test.xxxxxx.com is for hostfront endfor development purposes. The same

    • test. xxxxxx. com conf**
<VirtualHost *:80>
ServerName test.xxxxxx.com
ServerAlias www.test.xxxxxx.com
DocumentRoot /var/www/test.xxxxxx.com/html/
<Directory /var/www/test.xxxxxx.com/html/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
    • dev. xxxxxx. com conf**
<VirtualHost *:80>
ServerName dev.xxxxxx.com
# This is for websocket requests
ProxyPass /ws ws://localhost:8090/
ProxyPassReverse /ws ws://localhost:8090/
ProxyPass /wss wss://localhost:8090/
ProxyPassReverse /wss wss://localhost:8090/

DocumentRoot /var/www/dev.xxxxxx.com/public/
<Directory /var/www/dev.xxxxxx.com/public/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Order allow,deny
            allow from all
</Directory>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]   
</VirtualHost>
    • test. xxxxxx. com. htaccess**
<IfModule mod_rewrite.c>
RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>
    • dev. xxxxxx. com. htaccess**
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
    • error. log**
[Thu Oct 08 06:25:03.080835 2020] [mpm_prefork:notice] [pid 7166] AH00163 Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Oct 08 06:25:03.080868 2020] [core:notice] [pid 7166] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 08 06:58:55.476022 2020] [mpm_prefork:notice] [pid 7166] AH00169: caught SIGTERM, shutting down
[Thu Oct 08 06:58:55.591321 2020] [mpm_prefork:notice] [pid 27165] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Oct 08 06:58:55.591392 2020] [core:notice] [pid 27165] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 08 07:45:13.216293 2020] [mpm_prefork:notice] [pid 27165] AH00169: caught SIGTERM, shutting down
[Thu Oct 08 07:45:13.333468 2020] [mpm_prefork:notice] [pid 7532] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Oct 08 07:45:13.333534 2020] [core:notice] [pid 7532] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 08 07:48:35.893704 2020] [mpm_prefork:notice] [pid 7532] AH00169: caught SIGTERM, shutting down
[Thu Oct 08 07:48:36.048994 2020] [mpm_prefork:notice] [pid 9434] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Oct 08 07:48:36.049053 2020] [core:notice] [pid 9434] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 08 07:49:01.736094 2020] [mpm_prefork:notice] [pid 9434] AH00169: caught SIGTERM, shutting down
[Thu Oct 08 07:49:01.965885 2020] [mpm_prefork:notice] [pid 9836] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Oct 08 07:49:01.965966 2020] [core:notice] [pid 9836] AH00094: Command line: '/usr/sbin/apache2'

我启用了这两个站点并重新启动apache2,但dev不工作。有人吗?

umuewwlo

umuewwlo1#

原来,一个本地主机与相同的域dev.xxxxxx.com设置在hosts文件在C:\Windows\System32\drivers\etc,我删除了它从hosts文件,它工作顺利。

相关问题