我正在使用RHEL7以及所有必需的组件。
在我的虚拟主机设置上的所有ajax调用中安装了Symfony2.7并且 PROD 环境出现302错误。我的conf文件有:
<VirtualHost *:80>
ServerName newmaster.test.com
ServerAlias newmaster.test.com
DocumentRoot /var/www/html/newmaster/test/web/
<Directory /var/www/html/newmaster/test/web/>
AllowOverride All
Order allow,deny
Allow from all
Options +FollowSymLinks
DirectoryIndex app.php
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
#Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php?q=$1 [L,QSA]
</IfModule>
</Directory>
SetEnv SYMFONY__WEBSITE newmaster
# The SYMFONY__ENVIRONMENT variable is optional, and will default to prod
SetEnv SYMFONY__ENVIRONMENT prod
ErrorLog "/etc/httpd/logs/test_newmaster_error.log"
CustomLog "/etc/httpd/logs/test_newmaster_access.log" combined
web / .htaccess是:
<IfModule mod_rewrite.c>
RewriteEngine On
#<IfModule mod_vhost_alias.c>
# RewriteBase /
#</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
请帮助!!!