我最近在我的开发工作站上升级了Ubuntu操作系统(1004->12.04),我知道我在运行我正在进行的项目时遇到了麻烦。我认为这是一些与权限有关的问题。事实上,我已经让它在生产服务器上运行,没有任何问题。
有没有任何工具可以检查项目的文件夹权限是否有错误,或多或少像symfony 1中的"symfony project:permissions"?
我在我的开发前端收到了一个css问题的第一页,并收到了一条JS警报,上面写着:
An error occurred while loading the web debug toolbar (404: Not Found). Do you want to open the profiler?
web文件夹.htaccess与工作生产环境中的相同,并且我的apache配置仅在禁用ssl的情况下等于生产。
编辑:
虚拟主机配置:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
#<Directory />
# Options FollowSymLinks
# AllowOverride None
#</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
AcceptPathInfo On
Order allow,deny
allow from all
</Directory>
Alias /myproject /home/nelson/des/php/myproject/Symfony/web
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
尝试解决时包含了"AcceptPathInfo On"。我已经试过使用和不使用它。
的任何帮助
您似乎还没有发布资产(css、js、images…)
在Symfony的根文件夹中的命令行中尝试以下操作:
php app/console assets:install web/ --symlink
此外,检查重写模式是否启用:a2enmod rewrite
编辑:给定VirtualHost配置文件,您似乎将错误的文件夹交给了Apache。您的配置必须指向Symfony2的web
文件夹。例如:
<VirtualHost *:80>
DocumentRoot /home/myuser/www/Symfony/web
<Directory /home/myuser/www/Symfony/web>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
#......
</VirtualHost>