我遇到了问题。在DA中为域启用SSL并将RewriteRule添加到htaccess后,我有一个重定向循环。
这是我的vhost配置文件:
<VirtualHost 111.222.33.44:80 >
ServerName www.my-shop.net
ServerAlias www.my-shop.net my-shop.net
ServerAdmin webmaster@my-shop.net
DocumentRoot /home/admin/domains/my-shop.net/public_html/application/public
ScriptAlias /cgi-bin/ /home/admin/domains/my-shop.net/public_html/application/public/cgi-bin/
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup admin admin
</IfModule>
CustomLog /var/log/httpd/domains/my-shop.net.bytes bytes
CustomLog /var/log/httpd/domains/my-shop.net.log combined
ErrorLog /var/log/httpd/domains/my-shop.net.error.log
<Directory /home/admin/domains/my-shop.net/public_html/application/public>
php_admin_flag safe_mode OFF
php_admin_flag engine ON
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f admin@my-shop.net'
php_admin_value mail.log /home/admin/.php/php-mail.log
php_admin_value open_basedir /home/admin/:/tmp:/var/tmp:/usr/local/lib/php/
</Directory>
<VirtualHost 111.222.33.44:443 >
SSLEngine on
SSLCertificateFile /usr/local/directadmin/data/users/admin/domains/my-shop.net.cert.combined
SSLCertificateKeyFile /usr/local/directadmin/data/users/admin/domains/my-shop.net.key
SSLCACertificateFile /usr/local/directadmin/data/users/admin/domains/my-shop.net.cacert
ServerName www.my-shop.net
ServerAlias www.my-shop.net my-shop.net
ServerAdmin webmaster@my-shop.net
DocumentRoot /home/admin/domains/my-shop.net/public_html/application/public
ScriptAlias /cgi-bin/ /home/admin/domains/my-shop.net/public_html/cgi-bin/
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup admin admin
</IfModule>
CustomLog /var/log/httpd/domains/my-shop.net.bytes bytes
CustomLog /var/log/httpd/domains/my-shop.net.log combined
ErrorLog /var/log/httpd/domains/my-shop.net.error.log
<Directory /home/admin/domains/my-shop.net/public_html/application/public>
php_admin_flag safe_mode OFF
php_admin_flag engine ON
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f admin@my-shop.net'
php_admin_value mail.log /home/admin/.php/php-mail.log
php_admin_value open_basedir /home/admin/:/tmp:/var/tmp:/usr/local/lib/php/
</Directory>
自定义代码:
|*if !SUB|
|?DOCROOT=/home/admin/domains/my-shop.net/public_html/application/public|
|*endif|
配置中应该修复什么?我对nginx的管理更有信心..