httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khodadadeh <khodada...@hotmail.com>
Subject Re: [users@httpd] Apache 2.4 with PHP-FPM
Date Mon, 29 Aug 2016 13:13:46 GMT
<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">I said two websites for sake of
      simplicity. There are more than 30 websites and there is only one
      template for creating virtual host. So, i can't use two methods.
      it has to be one that works for both situations. <br>
      I don't have any problem with compiling the source or even editing
      the source code, as long as it gets the job done.<br>
      <br>
      <br>
      On 8/29/16 17:20, <a class="moz-txt-link-abbreviated" href="mailto:lester@lsces.co.uk">lester@lsces.co.uk</a>
wrote:<br>
    </div>
    <blockquote
      cite="mid:a1e3fd14-ae36-48f0-a7e5-05012a35f3e4.maildroid@localhost"
      type="cite">
      <div>You will need to create two virtual hosts. Otherwise apache
        does not know whi h rules to apply. vh1/... with direct access
        and vh2/... with the redirect. Then your sites are just prefixed
        by vh1 or 2<br>
        <br>
        <font color="#888888"><font color="#888888">Sent from my android
            device so quoting is crap ... need to kill these painful
            email clients!</font></font><br>
        <br>
        -----Original Message-----<br>
        From: khodadadeh <a class="moz-txt-link-rfc2396E" href="mailto:khodadadeh@hotmail.com">&lt;khodadadeh@hotmail.com&gt;</a><br>
        To: <a class="moz-txt-link-abbreviated" href="mailto:users@httpd.apache.org">users@httpd.apache.org</a><br>
        Sent: Mon, 29 Aug 2016 13:18<br>
        Subject: [users@httpd] Apache 2.4 with PHP-FPM<br>
        <br>
      </div>
      I have installed PHP-FPM 5.6  and Apache 2.4 with mod_proxy and 
<br>
      mod_proxy_fcgi.
<br>
      I have two web sites on my server. One Magento and the other one
      that is 
<br>
      written using Laravel framework.
<br>
      
<br>
      Magento has URLs like: <a moz-do-not-send="true"
        href="http://domain.com/index.php/ACP">http://domain.com/index.php/ACP</a>/
      
<br>
      <a moz-do-not-send="true" href="http://index.php">index.php</a>
      exists in document root.
<br>
      
<br>
      Laravel has URLs like: <a moz-do-not-send="true"
        href="http://example.com/help.php">http://example.com/help.php</a>
<br>
      <a moz-do-not-send="true" href="http://help.php">help.php</a> does
      NOT exist in document root. It will be rewritten to 
<br>
      <a moz-do-not-send="true" href="http://index.php">index.php</a>
      (using mod_rewrite).
<br>
      
<br>
      Currently I have this directive to connect to my PHP
      installation:
<br>
      
<br>
      ProxyPassMatch "^/(.*.php(/.*)?)$" 
<br>
      "unix:/var/run/php-fpm/<a moz-do-not-send="true"
        href="http://php5-username.sock">php5-username.sock</a>|fcgi://localhost/home/username/public_html"
      
<br>
      
<br>
      This works fine for Magento but when I browse Laravel URL(a
      non-existing 
<br>
      URL with .php in it), it shows me "File not found" message.
<br>
      
<br>
      If I switch to mod_rewrite  instead of mod_proxy_fcgi, I'll have
      laravel 
<br>
      URl working but not Magento:
<br>
      
<br>
      RewriteCond %{REQUEST_URI} "^/(.*.php(/.*)?)$"
<br>
      RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}  -f
<br>
      RewriteRule ^(.*)$ 
<br>
      "unix:/var/run/php-fpm/<a moz-do-not-send="true"
        href="http://php5-username.sock">php5-username.sock</a>|fcgi://localhost/home/username/public_html/$1"
      
<br>
      [P]
<br>
      
<br>
      
<br>
      
<br>
      Is there any solution that I can use that ensures rewrite rules
      will be 
<br>
      working and PATH_INFO is set?
<br>
      
<br>
      
<br>
      
<br>
      ---------------------------------------------------------------------
      
<br>
      To unsubscribe, e-mail: <a moz-do-not-send="true"
        href="mailto:users-unsubscribe@httpd.apache.org">users-unsubscribe@httpd.apache.org</a>
<br>
      For additional commands, e-mail: <a moz-do-not-send="true"
        href="mailto:users-help@httpd.apache.org">users-help@httpd.apache.org</a>
<br>
      
<br>
      
<br>
    </blockquote>
    <br>
  </body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message