{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/3472","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/3472/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/3472/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/3472/events","html_url":"https://github.com/facebook/hhvm/issues/3472","id":40300100,"number":3472,"title":"Getting 404 File Not Found on Apache 2.4, FastCGI and Ubuntu 14.04","user":{"login":"Zeokat","id":1313154,"avatar_url":"https://avatars.githubusercontent.com/u/1313154?v=3","gravatar_id":"","url":"https://api.github.com/users/Zeokat","html_url":"https://github.com/Zeokat","followers_url":"https://api.github.com/users/Zeokat/followers","following_url":"https://api.github.com/users/Zeokat/following{/other_user}","gists_url":"https://api.github.com/users/Zeokat/gists{/gist_id}","starred_url":"https://api.github.com/users/Zeokat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zeokat/subscriptions","organizations_url":"https://api.github.com/users/Zeokat/orgs","repos_url":"https://api.github.com/users/Zeokat/repos","events_url":"https://api.github.com/users/Zeokat/events{/privacy}","received_events_url":"https://api.github.com/users/Zeokat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/hhvm/labels/documentation","name":"documentation","color":"adff2f"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2014-08-14T21:15:01Z","updated_at":"2015-08-28T03:19:10Z","closed_at":null,"body":"My first step was install HHVM following this guide: https://github.com/facebook/hhvm/wiki/Prebuilt-packages-on-Ubuntu-14.04\r\n\r\nThen i run the script with the command: ´sudo /usr/share/hhvm/install_fastcgi.sh´\r\n\r\nThen i test if hhvm was installed with command ´php -v´ and the output is OK, says that HIPHOP VM is runing.\r\n\r\nThe 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.\r\n\r\nI search on Google and found many people with same issue but no solutions. Perhaps someone can help."},"comment":{"url":"https://api.github.com/repos/facebook/hhvm/issues/comments/135622186","html_url":"https://github.com/facebook/hhvm/issues/3472#issuecomment-135622186","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/3472","id":135622186,"user":{"login":"jelqui","id":7796702,"avatar_url":"https://avatars.githubusercontent.com/u/7796702?v=3","gravatar_id":"","url":"https://api.github.com/users/jelqui","html_url":"https://github.com/jelqui","followers_url":"https://api.github.com/users/jelqui/followers","following_url":"https://api.github.com/users/jelqui/following{/other_user}","gists_url":"https://api.github.com/users/jelqui/gists{/gist_id}","starred_url":"https://api.github.com/users/jelqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelqui/subscriptions","organizations_url":"https://api.github.com/users/jelqui/orgs","repos_url":"https://api.github.com/users/jelqui/repos","events_url":"https://api.github.com/users/jelqui/events{/privacy}","received_events_url":"https://api.github.com/users/jelqui/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T03:19:10Z","updated_at":"2015-08-28T03:19:10Z","body":"Setting HHVM with apache 2.4 running fastcgi:\r\n#nano /etc/apache2/mods-enabled/hhvm_proxy_fcgi.conf\r\ncomment this line\r\n#ProxyPassMatch ^/(.+\\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/$1\r\nWhy did we comment that line? to avoid having it running globally on apache instead we are going to edit each virtualhost on apache to make it run by each virtualhost    \r\n\r\nEdit  nano /etc/apache2/sites-available/virtualhost.conf\r\n#beginning  of virtualhost file\r\n<VirtualHost *:80>\r\n        ServerName example.com\r\n\r\n        ServerAdmin webmaster@partshighway.com\r\n        DocumentRoot /home/www/public_html\r\n        ProxyPassMatch ^/(.*\\.php(/.*)?)$ fcgi://127.0.0.1:9000/home/www/public_html/$1\r\n\r\n        ErrorLog /home/www/log/error.log\r\n        CustomLog /home/www/log/access.log combined\r\n\r\n        <Directory /home/www/public_html/>\r\n                DirectoryIndex index.php\r\n                AllowOverride All\r\n                Require all granted\r\n        </Directory>\r\n</VirtualHost>\r\n# vim: syntax=apache ts=4 sw=4 sts=4 sr noet\r\n#end of virtualhost file\r\n\r\n#sudo service apache2 stop\r\n#sudo service hhvm stop\r\nthan\r\n#sudo service hhvm start\r\n#sudo service apache2 start"}}