Note that there are some explanatory texts on larger screens.

plurals
  1. PORewrite Rule translate from Lighttpd Regex to NginX
    primarykey
    data
    text
    <p>Not quite sure where to start from here. I have this rewrite rule that we used for our apps using lighttpd and we're contemplating of moving the web server to NginX for standardization.</p> <p>Lighttpd config line inside the lighttpd.conf:</p> <pre><code>url.rewrite-once = ( ".*\?(.*)$" =&gt; "/index.php?$1", "^/js/.*$" =&gt; "$0", "^.*\.(js|ico|gif|jpg|png|css|swf |jar|class)$" =&gt; "$0", "" =&gt; "/index.php" ) </code></pre> <p>First, can anyone help me translate those lines? I inherit it from someone else and have no idea what that means? </p> <p>Next, How do I convert those lines to usable configuration line in NginX? I'm not even sure what to provide to you all to help with understanding the line. All I know is that when we remove those lines from lighttpd, the apps stop working. I have our NginX working on a standard Php with Php-fpm on centos 6.4. when I use the phpinfo file, NginX was able to generate the info but when we installed the apps it errored with this error inside the error log file.</p> <pre><code>2013/08/12 21:51:00 [error] 18844#0: *16 open() "/var/www/html/myapps/public/user/login" failed (2: No such file or directory), client: 192.168.8.100, server: _, request: "GET /user/login HTTP/1.1", host: "192.168.8.215" </code></pre> <p>and on the web browser I got "<strong>404 not found</strong>" error.</p> <p>Also for consistency, can anyone suggest how to translate this line?</p> <pre><code>location / { if ( $uri !~ ^/(index\.php|css|images|core|uploads|js|robots\.txt) ) { rewrite ^ /index.php last; } } </code></pre> <p>Please advise on additional information I can provide to help with the translation? I wasn't even sure whether this is an NginX problem or apps problem. Many thanks in advance for all of your help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload