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

Angular AWS子域之一不工作,带有dev(dev.example.com)的子域不工作,angular,laravel,apache,amazon-s3,devops,Angular,Laravel,Apache,Amazon S3,Devops,我创建了两个子域test.xxxxxx.com和dev.xxxxxx.com,test.xxxxxx.com工作正常,但dev.xxxxxx.com不工作 dev.xxxxxx.com用于托管Laravel API,test.xxxxxx.com用于托管前端,用于开发目的。同样的 test.xxxxxx.com conf <VirtualHost *:80> ServerName test.xxxxxx.com ServerAlias www.test.xxxxxx.com Docu

我创建了两个子域test.xxxxxx.com和dev.xxxxxx.com,test.xxxxxx.com工作正常,但dev.xxxxxx.com不工作

dev.xxxxxx.com用于托管Laravel API,test.xxxxxx.com用于托管前端,用于开发目的。同样的

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>
<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>
错误。日志

[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
但是开发工具不起作用。有人吗?

你有2个文件夹吗
var/www/dev.xxxxxx.com/public/
var/www/test.xxxxxx.com/html/
?yes@KamleshPaul。如果注释掉代理代码,该方法是否有效?换句话说,如果所有选项都设置相同,它会工作吗?您的意思是删除用于套接字的代码@Tpojka@Tpojka仍然无法工作,我删除了该代码
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
[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'