Nginx help: how and where to put the code provided in documentation?

Dear Sir,

I am installing Taotesting on my Nginx server but do not know how and where I should put the following code provide in the documentation:

location ~* ^/([^//])/views/. {

location /tao/install {

location /tao/getFile.php {
rewrite ^(.*)$ /tao/getFile.php last;

location /favicon.ico {

location / {
rewrite ^ /index.php;

I have tried to put it into .htaccess file and nginx.conf file, neither works.

Is it possible to get help on this issue?

Thanks a lot.


  • Hi jchrisj,

    You probably refer to that page.

    Actually, .htaccess files are ignored by nginx. nginx.conf is the default configuration of the web server, not the configuration for the default host, that is usually located here: /etc/nginx/sites-available/default. Feel free to update this configuration or on a multi-host server you may duplicate that latter and rename it as 'tao'.

    Btw, we didn't add more information as we assumed that this was self-explanatory for a beginner on nginx.


Sign In or Register to comment.

We use cookies on our website to support technical features that enhance your user experience. Cookie Policy Privacy Policy