<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<pre>Side Note: It appears the forum is down. <a class="moz-txt-link-freetext" href="http://forum.nginx.org">http://forum.nginx.org</a> says, "The database connection failed. Please check your database configuration
in include/db/config.php. If the configuration is okay, check if the database server is running."
> That's not what ^~ means.</pre>
The manual says, "If the longest matching prefix location has the “<code>^~</code>”
modifier then regular expressions are not checked". Which means that
a ^~ location will have a higher priority than a regular expression
rule, right?<br>
<br>
<br>
<pre>> What request do you make?
> Which one of the above locations does the request match?
> What output do you expect?
> What output do you get?
First rule:
</pre>
location ^~ /wordpress/ {<br>
try_files $uri /wordpress/index.php =404;<br>
}<br>
<br>
What I intend: "If the URL starts with "/wordpress/", then do not
check any regular expression rules. Instead, load the requested URI
directly."<br>
What happens: when visiting "wordpress/" I get a blank page.<br>
The Log:<br>
2014/04/30 02:39:06 [debug] 27354#0: post event 00007F68E8FD9010<br>
2014/04/30 02:39:06 [debug] 27354#0: delete posted event
00007F68E8FD9010<br>
2014/04/30 02:39:06 [debug] 27354#0: accept on 0.0.0.0:80, ready: 1<br>
2014/04/30 02:39:06 [debug] 27354#0: posix_memalign:
0000000000E79F90:256 @16<br>
2014/04/30 02:39:06 [debug] 27354#0: *5 accept: [REMOVED MY IP] fd:9<br>
2014/04/30 02:39:06 [debug] 27354#0: *5 event timer add: 9:
20000:1398825566351<br>
2014/04/30 02:39:06 [debug] 27354#0: *5 reusable connection: 1<br>
2014/04/30 02:39:06 [debug] 27354#0: *5 epoll add event: fd:9 op:1
ev:80000001<br>
2014/04/30 02:39:06 [debug] 27354#0: accept() not ready (11:
Resource temporarily unavailable)<br>
<br>
That's it, no error.<br>
<br>
<br>
Second Problem Rule:<br>
<br>
I have updated this rule to be a regex rule:<br>
<br>
llocation ~ ^/(wp-(content|admin|includes).*) {<br>
try_files /wordpress/$1 /wordpress/$1/index.php =404;<br>
}<br>
<br>
<br>
What I intend: "If /wp-content followed by anything, or /wp-admin
followed by anything, or /wp-includes followed by anything: Silently
(no browser redirect) show the same URL as if a /wordpress/
directory were inserted in front. ie. "/wp-admin/bob" becomes
"/wordpress/wp-admin/bob/", but does not do a redirect. If a
directory, load index.php inside the given directoy."<br>
What happens: I visit /wp-admin/ and get wp-admin.php, dumped as
plain text.<br>
<br>
It's not passing to PHP.<br>
<br>
But I have a PHP block:<br>
<br>
location ~ \.php$ {<br>
try_files $uri =404;<br>
fastcgi_split_path_info ^(.+\.php)(/.+)$;<br>
fastcgi_index index.php;<br>
include fastcgi_params;<br>
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;<br>
fastcgi_pass unix:/var/run/php5-fpm.sock;<br>
}<br>
<br>
So it should be passing to PHP?<br>
<br>
<br>
</body>
</html>