Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: accessing two different sites by 192.x.x.x/test1 and 192.x.x.x/test2 possible?

$
0
0
Finally it's running. Thanks for your help. My site-file for nginx is at follows:



server {

listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;

root /var/www;
index index.php index.html index.htm;

# Make site accessible from http://localhost/
server_name localhost;

index index.php;

# This section can be copied into an existing default setup
location /rompr {
allow all;
index index.php;
client_max_body_size 32M;
location ~ \.php$ {
# try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm-rompr.sock;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
error_page 404 = /rompr/404.php;
try_files $uri $uri/ =404;
location ~ /rompr/albumart/* {
expires -1s;
}
}


location ^~ /cloud {
index index.php;
try_files $uri $uri/ /index.php?$args;
client_max_body_size 512M;
location ~ ^/cloud/(?:\.|data|config|db_structure\.xml|README) {
deny all;
}
rewrite ^/cloud/apps/([^/]+)/(.+\.(css|php))$ /cloud/index.php?app=$1&getfile=$2 last;
rewrite ^/cloud/remote/(.*)$ /cloud/remote.php/$1 last;
location ~ \.php/? {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm-cloud.sock;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(?:jpg|gif|ico|png|css|js|svg)$ {
expires max; add_header Cache-Control public;
}
}





}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>