0
<Directory "/Users/pathto/Sites/">
  Options Indexes FollowSymLinks
  AllowOverride All
  Require all granted
</Directory>

<VirtualHost *:80>
  ServerName developersite.dev
  ServerAlias developersite.dev
  DocumentRoot "/Users/pathto/Sites/app/"
  ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9070/Users/pathto/Sites/app/$1
  DirectoryIndex /index.php index.php
</VirtualHost>

I'm having trouble viewing any page on my Magento 2 site outside of the main page. Everything shows up fine on index.php(images, cms details etc). When I go to any other page I get a message saying the requested URL was not found on server.

Not Found The requested URL /catalogsearch/result/ was not found on this server.

I'm using php70 and httpd with homebrew. My httpd.conf has the proxy_fcgi_module uncommented, as well as rewrite_module.

My working theory is that the proxy is only handling the index.php site - not any other iterations of that. Any suggested issues with how to resolve or insights on where to look would be great. Thanks.

UPDATE

I have discovered that if I go to developersite.dev/catalogsearch/result/ I get the error as described above. However if I go to developersite.dev/index.php/catalogsearch/result/ -- it works. I still am not sure how to work around this problem. web/seo/use_rewrites are set to YES.

1 Answer 1

1

do not use ProxyPassMatch use SetHandler instead, something like this:

<FilesMatch \.php$>
        SetHandler proxy:fcgi://127.0.0.1:9070
    </FilesMatch>
<Proxy "fcgi://127.0.0.1:9070">
    ProxySet connectiontimeout=7200 timeout=7200
</Proxy>
1
  • Good to know! Still having the same issue -- think I've made a discovery on what's going on, I'll update above. Would love your feedback though! Oct 19, 2017 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.