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).
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 ???
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…
The text itself also refers to a lengthier .conf file…
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 ?
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.
I have an analogue problem with a migrated wordpress site that doesn’t work anymore. It came from apache and I believe that I must add this to the nginx conf file :
i need to add this directive
try_files $uri /index.php?q=$uri&$args;
but it seems it's not working
2mo ago
the problem is that drupal is not working without url rewrite cause it returns always 404 not found
if u need in future for drupal you can create a dyn-9001.custom file and add this
rewrite ^(/.*\.(css|js|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot|map))$ $1 break;
rewrite ^/$ /index.php last;
rewrite ^/index\.php$ /index.php break;
rewrite ^/(.+)$ /index.php?q=$1 last;