以下为apache中Vhost 80端口的配置
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot \”/data/wwwroot/domain.com\”
ServerName domain.com
ServerAlias domain.com
ErrorLog \”/data/wwwlogs/domain.com_error_apache.log\”
CustomLog \”/data/wwwlogs/domain.com_apache.log\” common
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://resource-pov.xxx.com/$1 [R=301,L]
</IfModule>
<Directory \”/data/wwwroot/domain.com\”>
#SetOutputFilter DEFLATE
Options Indexes FollowSymLinks ExecCGI
#Require all granted
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot \”/data/wwwroot/domain.com\”
ServerName domain.com
ServerAlias domain.com
ErrorLog \”/data/wwwlogs/domain.com_error_apache.log\”
CustomLog \”/data/wwwlogs/domain.com_apache.log\” common
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://resource-pov.xxx.com/$1 [R=301,L]
</IfModule>
<Directory \”/data/wwwroot/domain.com\”>
#SetOutputFilter DEFLATE
Options Indexes FollowSymLinks ExecCGI
#Require all granted
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>