# [RESOLVED] PHP requests question



## fred974 (Feb 24, 2014)

Hello everyone,

I'm setting up PHP on my jail NGINX webserver..
Could anyone please clarify when to use PHP requests through TCP 
	
	



```
fastcgi_pass 127.0.0.1:9000;
```
 and when to use PHP requests via socket 
	
	



```
fastcgi_pass unix:/var/run/php-fpm.sock;
```

My FreeBSD 10 host has 1 webjail running Nginx and 1 DBjail running MySQL.


----------



## SirDice (Feb 24, 2014)

*Re: PHP requests question*

Your jail doesn't have a localhost so you must use the socket.


----------



## fred974 (Feb 24, 2014)

*Re: PHP requests question*



			
				SirDice said:
			
		

> Your jail doesn't have a localhost so you must use the socket.




Thank you


----------



## kpa (Feb 24, 2014)

Mandatory nitpick: Both solutions use socket(2)s but the first one uses TCP sockets and the other one UNIX domain sockets. Both behave the same from the point of view of the application though.


----------

