WebFaction
Community site: login faq

Hi, I have a static website, esourcecapital.com And I'm only using Apache for some RewriteRules and a 404 file that logs the broken links at /404.php (pretty neat btw!) So I was wondering if there's a simple way to serve all with nginx except the .htaccess and 404.php (if there's a way for .htaccess only I could live without the 404.php)

All I can think of is to move everything to a subfolder and redirect all, but that wont be very friendly/elegant.

Any other way?

asked 18 Feb '13, 02:11

Diego
112
accept rate: 0%


You'd need two separate apps to do this: a static/cgi/php app (or the corresponding symlink type) for the PHP processing, and a static-only app (or the corresponding symlink type). You'd need to handle it in PHP first for your 404 processing, and then redirect to the static-only app.

If that is something you don't want to do, then my recommendation is that you don't log 404's with PHP, and just get them from your existing access logs in ~/logs/frontend/access*.log instead.

permanent link

answered 18 Feb '13, 18:38

seanf
12.2k42136
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×6

question asked: 18 Feb '13, 02:11

question was seen: 1,466 times

last updated: 18 Feb '13, 18:38

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM