-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting 404 File Not Found on Apache 2.4, FastCGI and Ubuntu 14.04 #3472
Comments
I have exactly same problem, i have followed documentation instructions and i get error 404 with PHP files. Exists a solution? |
Do you directly access the php file? Like |
Hi SiebelsTim, Didn´t explore Ok, i found this #3285 and seems a bug that they not solved. |
I tested it earlier today, it worked for me. All other files probably can be accessed because apache handles them itself. Only PHP files should be sent to hhvm (ProxyPassMatch sets this) |
I don't have the machine runing now, but i not modified Did you tryed on Ubuntu 14.04 x64? |
Ok i tested and have exact same issues. My config files: I have no luck at all runing it and i have no idea what is wrong. |
As SiebelsTim said, you could put "hhvm.server.fix_path_info = true" in /etc/hhvm/server.ini and restart hhvm with "/etc/init.d/hhvm restart". |
Thanks @filippouni i will test again but i think that i already tested that and didn't helped. |
I got the same problems with 404 errors under Ubuntu 12.04 with Apache 2.2 and FastCGI. After i put "hhvm.server.fix_path_info = true" everything works fine. |
The issue seems to be with /etc/apache2/mods-enabled/hhvm_proxy_fcgi.conf - it overrides the proxy config in the vhost. Removing the whole file (symlink) and restarting apache made it work for me. You need a ProxyPassMatch or ProxyPass in your vhost though. |
hhvm.server.fix_path_info = true is required if you use any mod_rewrite rule just FYI. |
As the issue still persists for fresh installations on Ubunty 14.04 (x64), here is what worked for us when testing HHVM. As removing "/etc/apache2/mods-enabled/hhvm_proxy_fcgi.conf" from the system will result in PHP scripts not being served by HHVM, it is not a solution for the issue at hand. Instead we had to do the following:
Hope this is of any help :-) |
@SpamTrawler, it seems to me that hhvm_proxy_fcgi.conf sets a global proxypass. This might work on a single-site installation, but adding "html/" only makes that global proxy look in another directory - it still blocks any vhost config. Removing the file and setting ProxyPass directives locally (vhost conf) made it work for me. I'm sure there is a more clean solution, but I havn't found it ... |
So I had the exact same problem, tried all the suggestions here, but for some reason it still 404'd. Thanks to #hhvm chat, I tried
|
Also had this issue and had to do a mixture of steps:
Environment
|
Setting HHVM with apache 2.4 running fastcgi: Edit nano /etc/apache2/sites-available/virtualhost.conf
vim: syntax=apache ts=4 sw=4 sts=4 sr noet#end of virtualhost file #sudo service apache2 stop |
Thanks @SiebelsTim, hhvm.server.fix_path_info solved my issue here. |
Looks like there's a resolution here. fix_path_info is now documented here: https://docs.hhvm.com/hhvm/configuration/INI-settings#common-options |
My first step was install HHVM following this guide: https://github.com/facebook/hhvm/wiki/Prebuilt-packages-on-Ubuntu-14.04
Then i run the script with the command: ´sudo /usr/share/hhvm/install_fastcgi.sh´
Then i test if hhvm was installed with command ´php -v´ and the output is OK, says that HIPHOP VM is runing.
The problem arrives when i try to access to a PHP file, Apache always return 404 error. In the other hand html files and static files works good. I only receive 404 error with php files.
I search on Google and found many people with same issue but no solutions. Perhaps someone can help.
The text was updated successfully, but these errors were encountered: