Can We Configure txt file in Nginx Locaton -


i have server different type of project deploy . project in php ans in java war file jboss . using nginx layer working fine following configure

for php project

 location ~ \.php$ {             root           html;             fastcgi_pass   127.0.0.1:9000;             fastcgi_index  index.php;             fastcgi_param  script_filename  /usr/local/nginx/html$fastcgi_script_name;             include        fastcgi_params;         }          location ~ ^/(images|javascript|js|css|flash|media|static)/  {             root    html/static;             expires 30d;         }         location ~ attendance/(js|css|images)/  {          #  root  html;           expires 30d;           } 

for java project

server {         listen       80;         server_name  ncmmi02;          #charset koi8-r;          access_log   /mnt/vol1/nginx_logs/host.access.log;          location / {             root   html;             access_log off;             proxy_pass http://10.20.9.13:9090;             proxy_set_header x-real-ip $remote_addr;             proxy_set_header host $host;             proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;            # proxy_redirect off;         } 

for java project run have use example.com/abc (abc war file ) , php project used example.com/attendance

now want txt file show data example.com/rom.txt in time contain not show in browser

add location right below *.php 1

location ~ *\.txt$ {     root /path/to/your/root; } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -