Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8089485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:24:34+00:00 2026-06-05T19:24:34+00:00

I’m working on a larger Web based Project, that probably will have to handle

  • 0

I’m working on a larger Web based Project, that probably will have to handle a couple of hundred requests per minute in a later stage (or more).

I never worked with NGINX, but reading the comparisions with apache, it seems that I probably should go the NGINX route. Reading about it, I always see that ‘.htaccess’ files are a lazy solution. Now, I would like to avoid relying on .htaccess files, but my question is how?

What I mean is – if .htaccess are considered the lazy, hacky solution, what exactly is the clean solution for this issues:

  • Redirecting all specific URL’s (except for CSS / Images, and this stuff), to a single php file (by the way, does that have a performance impact, if a single file like index.php handles the URL’s and includes the required templates? Should I avoid that, and split into dozens of files?)

  • Reading PHP Tags inside of CSS Files (“AddHandler application/x-httpd-php .css …”)

  • Another layer of login (.htaccess authentication, with that little popup window)

This are basically the three things I’m using .htaccess for. Especially the first one, basically makes the whole Application work at all.

But for this Project, I’m really trying to stay clean, and up-to-date, solution wise. What are my possibilities? Where could I increase my performance? And how can I solve the 3 mentioned problems, whitout using a .htaccess, to develop on NGINX?

Thank you very much for your time and effort.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:24:35+00:00Added an answer on June 5, 2026 at 7:24 pm

    In order to get the most out of nginx, you have to understand that it is not a web server (like Apache), but a proxy. In simple terms, it acts like a giant rule engine to pass stuff along to other applications based on pattern matching on requests.

    So to run PHP with nginx, you need a separate server (or process) that runs PHP. This can be Apache, but PHP includes a FastCGI Process Manager (FPM).

    Here is basic boilerplate to get you going:

    server {
       listen 80;
       server_name www.example.com example.com;
       access_log /var/www/www.example.com/logs/access.log;
       error_log /var/www/www.example.com/logs/error.log;
       root /var/www/www.example.com/public_html;
    
       location / {
           index  index.html index.htm index.php;
           auth_basic            "Username Required";
           auth_basic_user_file  /etc/nginx/htpasswd;
       }
    
       location ~ (\.php|\.css)$ {
           try_files $uri =404;
    
           include /etc/nginx/fastcgi_params;
           fastcgi_index index.php;
           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
           fastcgi_pass php;
       } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.