我在请求时得到这个sorial/app_dev.php:
Not Found
The requested URL /app_dev.php/ was not found on this server.
Run Code Online (Sandbox Code Playgroud)
请求时sorial/app.php:
注销(); $ apcLoader->寄存器(真);*/$ kernel = new AppKernel('prod',false); $内核级> loadClassCache(); // $ kernel = new AppCache($ kernel); //当使用HttpCache,你需要调用方法前端控制器,而不是依赖于配置参数//支持:: enableHttpMethodParameterOverride的(); $ request = Request :: createFromGlobals(); $ response = $ kernel-> handle($ request); $响应 - >发送(); $ kernel-> terminate($ request,$ response);
我在Ubuntu 14.04和Apache 2.4上
编辑:这是我的虚拟主机:
<VirtualHost *:80>
ServerName sorial
#ServerAlias sorial.es
DocumentRoot /var/www/sorial/web
DirectoryIndex app.php
#SetEnv SYMFONY__DATABASE__PASSWORD jander
<Directory /var/www/sorial/web/>
# Options Indexes FollowSymLinks MultiViews
AllowOverride All
#Order allow,deny
#allow from all
Require all granted
FallbackResource /index.php
# BEGIN EXPIRES
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 10 days"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/plain "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-icon "access plus 1 year"
</IfModule>
# END EXPIRES
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我的文档根目录是/var/www/sorial/web.
事实是我对其他网站也有同样的问题.当我尝试禁用/启用env_mod使用时问题就开始了a2dismod env,因为在添加变量时SetEnv(正如你在我的虚拟主机中看到的那样)我得到了
apache2.service的作业失败,因为控制进程退出并显示错误代码.有关详细信息,请参阅"systemctl status apache2.service"和"journalctl -xe".
什么时候重启apache.
我终于解决了安装 php5 和 libapache2-mod-php5 的问题,如下所示:sudo apt-get install php5 libapache2-mod-php5
| 归档时间: |
|
| 查看次数: |
2019 次 |
| 最近记录: |