ansonl
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Twenty Twelve] Author Does Not DisplayHi smoo, thanks for the css info, that did the trick.
Forum: Fixing WordPress
In reply to: Directory access using NginxI posted on rtCamp’s forums and have gotten the problem partially solved for those who are wondering.
https://rtcamp.com/support/topic/accessing-non-wordpress-directory-in-website-root/#post-38522
Forum: Fixing WordPress
In reply to: Directory access using NginxThanks for the help, after adding in the nested
~ \.phpblock, the PHP files inside the/apidirectory work perfectly, however when accessing static text files, Nginx returns a nginx 404 error page instead of the wordpress error now.
For example, accessing file located at/api/newest.txtreturns 404 whereas accessing/api/newest.plistserves the actual plist file which the browser downloads.Modified config following the pastebin example below (I have removed the
try_filesoption for/api, is try_file only necessary for PHP files? Addingtry_filesdoesn’t seem to make a difference.):server { server_name www.geometrystash.com; rewrite ^(.*) http://geometrystash.com$1 permanent; } server { listen 80; server_name geometrystash.com; root /var/www/geometrystash.com/htdocs/blog; index index.php; include /etc/nginx/security; # Logging -- access_log off; error_log /var/log/nginx/geometrystash.com.error.log warn; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } # serve static files directly location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ { access_log off; expires max; } location /api { root /var/www/geometrystash.com/htdocs; index index.php; location ~ \.php$ { try_files $uri $uri/ /index.php?$args; fastcgi_pass unix:/var/run/php5-fpm/geometrystash.com.socket; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } } location ~ \.php$ { try_files $uri $uri/ /index.php?$args; fastcgi_pass unix:/var/run/php5-fpm/geometrystash.com.socket; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } }Forum: Fixing WordPress
In reply to: Directory access using NginxSite domain is geometrystash.com. Nginx server conf file for this site posted below.
server { server_name www.geometrystash.com; rewrite ^(.*) http://geometrystash.com$1 permanent; } server { listen 80; server_name geometrystash.com; root /var/www/geometrystash.com/htdocs/blog; index index.php; include /etc/nginx/security; # Logging -- access_log off; error_log /var/log/nginx/geometrystash.com.error.log warn; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } # serve static files directly location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ { access_log off; expires max; } location /api { try_files $uri $uri/ /index.php?$args; root /var/www/geometrystash.com/htdocs; index index.php; } location ~ \.php$ { try_files $uri $uri/ /index.php?$args; fastcgi_pass unix:/var/run/php5-fpm/geometrystash.com.socket; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } }