NS8 & NGINX .conf file

Hi all,

For Apache, in /etc/httpd/conf/httpd.conf, I can set AllowOverride to All so the directives in .htacess can All be applied.

# AllowOverride 
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:

I would like to add this line in nginx.conf:
AllowOverride All
so the directives in .htacess can All be applied for WordPress in webserver1 (9001).

Where is that nginx.conf for webserver1 (9001) ?


Hi all,

According to: How I migrated from Apache to Nginx – Donny Wals

What you might notice here is that the nginx configuration is a little bit longer and more detailed than the one for apache. This is because apache uses .htaccess files to set up global or per folder access and rewrite rules. Nginx doesn’t use these files and instead the configuration for that goes into your server configuration.

…instead the configuration for that goes into your server configuration…

I wonder what it means by server configuration ???


Hi @michelandre

Nginx sees itself as “server” app, in line with a long linux tradition.
As such it’s another way of saying the .conf file of nginx… :slight_smile:
The text itself also refers to a lengthier .conf file…

My 2 cents

1 Like

I do not know if it is possible to easily override the config in the ns8 app: it much depends on the container configuration.

Let’s ask @stephdl !

1 Like

Please take a read to the readme of ns8 module when you look informations we try to keep tracks to manual settings by cli or hidden features from UI

You could add a dyn-9001.custom to /home/webserver*/.config/state/conf.d/

1 Like

AllowOverride is missing we need to add it as NFR

It is in this file that I added “index.php” and it worked.

Wihout it I have “Forbidden”


1 Like

Salut Stéphane,

Does it means that AllowOverride is not used or that .htaccess is not use and that the directives for .htaccess should be included in vhost-nginx.conf ?

My goal for today was to study the original nginx.conf from https://docs.nginx.com.


Salut Stéphane,

The introduction of this file is very nice but there is not a single line explaining what this file does.
I think there should be at least a few lines describing the file and its purpose in every single file written! If not, good luck for the next programmer…

In another life, when I was programming in Perl, I wrote much more lines of description than lines of code. Even so, in this life if I read back, It’s diffical to follow on the first reading - imagine without a description.
It was even much worse with LISP - (Lost In Stupid Parentheses) the really but the most really worse one to follow what the writer is doing.


Yes I could agree but when you start to explain the code it is that the code is badly written

I can read as cristal clear what the code does

Salut Stéphane,

That is because you are young and a very good programmer with a very good memory.

Life is long and as it goes by, the ability and mainly the memory are weakening for everyone, no exception.

I am not sure that in 20 years you will see those codes as clearly as today.
Just wait and see with the next programmer.


1 Like

I have tried to use the $“vhost”.custom , (thank you for thinking about it :slight_smile: )

apparently we can’t add directives to the “/” location ,


location / {
        root   /usr/share/nginx/html/9004;
        index  index.html index.htm index.php;
        autoindex on;


$shell> cat dyn-9004.custom
    location /. {
    add_before_body header.xhtml;
    add_after_body  footer.xhtml;

Nginx complains about duplicate “blocks” etc,

My goal, is to serve an index_less folder , but I add to it some cosmetics …
(for a data mirror (Linux distros …))

if anyone has a suggestion, I’ll be more than grateful :slight_smile:

Did you try to add only this in the custom file


It works !

Thank you again