一个AWS子域不起作用,一个使用dev(dev.example.com)的子域不起作用

时间:2020-10-08 07:19:00

标签: 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
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 但开发人员无法正常工作。有人吗?

0 个答案:

没有答案