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
Thanks for your reply. Now I know, that was not completely wrong.

I actually defined two site in the "sites-available" folder of nginx: owncloud and rompr


owncloud:

server {
listen 8080;

root /var/www;
access_log /var/log/nginx/access_log_custom1;
#index index.html index.htm index.php;

server_name cloud;
#server_name rompr;


location /cloud {
root /var/www/cloud;
index index.html index.php;
}


location ~ \.php$ {
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-fpm-owncloud.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}


and for rompr:


server {
listen 80;

access_log /var/log/nginx/access_log_www;


server_name rompr;

location /rompr {

root /var/www/rompr;
index index.php;

}


location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm-rompr.sock;
fastcgi_index index.php;
include fastcgi_params;
}

}





The thing is still not working. The error.log tells:

2014/05/04 07:27:32 [crit] 22455#0: *1 connect() to unix:/var/run/php5-fpm-rompr.sock failed (2: No such file or directory) while connecting to upstream, client: 1$
2014/05/04 07:27:39 [error] 22455#0: *1 "/var/www/rompr/rompr/index.php" is not found (2: No such file or directory), client: 192.168.1.37, server: rompr, request:$
2014/05/04 07:27:49 [crit] 22455#0: *1 connect() to unix:/var/run/php5-fpm-rompr.sock failed (2: No such file or directory) while connecting to upstream, client: 1$
2014/05/04 07:33:38 [error] 22455#0: *6 "/var/www/rompr/rompr/index.php" is not found (2: No such file or directory), client: 192.168.1.37, server: rompr, request:$
2014/05/04 07:34:52 [crit] 22455#0: *7 connect() to unix:/var/run/php5-fpm-rompr.sock failed (2: No such file or directory) while connecting to upstream, client: 1$



The first problem is, that the directory path is wrong as "rompr" is doubled. The second problem is, that I type in IP/cloud and IP/rompr but I get the error message for the "rompr" but not for the "cloud". So it seems to me that there is something wrong with linking or redirecting?

Do you have any idea what could be wrong?

Thanks for your help!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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