我有一個Wordpress實例和一個SimpleSAMLphp實例需要從相同的子域進行訪問,並且它似乎像Wordpress干擾了Apache別名。Apache mod_rewrite別名被Wordpress重寫規則覆蓋
的httpd.conf
#
# VHOST for the Wordpress instance and provides an alias
# so simpleSAMLphp can be accessed at saml.domain.com/saml
#
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
<VirtualHost *:443>
ServerAdmin [email protected]
ErrorLog logs/saml.domain.com-error_log
CustomLog logs/saml.domain.com-access_log common
SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
RewriteLog "/var/log/httpd/mod_rewrite.log"
ServerName saml.domain.com
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
Options All
AllowOverride All
Require all granted
</Directory>
Alias /saml "/var/simplesamlphp/www"
<Directory "/var/simplesamlphp/www">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
的.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
/無功/日誌/ httpd的/ ssl_error_log
[Wed Mar 27 18:00:03 2013] [error] [client 10.0.3.133] File does not exist: /var/www/html/favicon.ico
[Wed Mar 27 18:00:05 2013] [error] [client 10.0.3.133] File does not exist: /var/www/simplesamlphp
[Wed Mar 27 18:00:05 2013] [error] [client 10.0.3.133] File does not exist: /var/www/html/favicon.ico
[Wed Mar 27 18:03:46 2013] [error] [client 10.0.3.133] File does not exist: /var/www/html/favicon.ico
[Wed Mar 27 18:03:47 2013] [error] [client 10.0.3.133] File does not exist: /var/www/html/favicon.ico
[Wed Mar 27 18:03:56 2013] [error] [client 10.0.3.133] File does not exist: /var/www/simplesamlphp
/var/log/httpd/mod_rewrite.log
該文件是空白
http://saml.domain.com/saml = simpleSAMLphp管理菜單。
http://saml.domain.com/anything-else = WordPress的網頁
的要saml.domain.com/saml結果是一個WordPress 404頁。在我強制SSL並修復Wordpress重寫之前,我已經有了這個工作,所以如果任何人有任何有用的信息,將是偉大的!
在此先感謝!