Closed j-mie closed 11 years ago
This will break Debian 6 support I believe....
@cwaffles Yeah. Same. Lemme fix it.
That should do it
I think that will cause a conflict, because by default, debian 6 php will auto listen on 127.0.0.1:9000, now we just added a second listener..., maybe we can just use sed to replace the line that says that with the socket...
@cwaffles We are moving the old config file to the backup directory. Surely this removes the first listener so we only have one?
It is kind of hackish...., let me try to find a better solution
Sure. Although it's exactly the same method it uses to change other config files :smile:
Using unix sockets on a single host has a lower overhead. However, if you have multiple servers (because your site is growing) you must use TCP if you wish to forward from nginx to others servers running PHP instances.
Thoughts?
Perhaps you could have an option such as ./setup-debian.sh php socket or /setup-debian.sh port or something?
I think that option would also need to be cared over into the other commands that assume PHP is on the TCP port. However, my question is if there is any reason to move from the more universal TCP port to a unix socket other than a possible small gain in connection overhead.
Greater security as it has a lower possibility to be snooped on?
It isn't passing through any networking layer either. On Jun 26, 2013 11:07 AM, "David Pennington" notifications@github.com wrote:
I think that option would also need to be cared over into the other commands that assume PHP is on the TCP port. However, my question is if there is any reason to move from the more universal TCP port to a unix socket other than a possible small gain in connection overhead.
— Reply to this email directly or view it on GitHubhttps://github.com/Xeoncross/lowendscript/pull/20#issuecomment-20067965 .
Yeah, Must say I prefer the socket approach. As I said there could be an option?
The extra security from the unix sockets (and the lower overhead) combined with the fact that NGINX itself seems to be defaulting to that now seems like that is perhaps the best choice over all.
When applications grow, and people need to switch to TCP they can do that manually since it's a simple change.
To keep things simple, I vote for no choice option until we have a good way of doing so and in the meantime make the switch to unix sockets.
Yeah. I'd say sockets are more convenient. If people are capable of getting a website big enough that it needs to be expanded past the point of using sockets then I'm sure they can switch it. I take it this pull request will do @Xeoncross ?
Two more things:
I'll fix this now. Was a complete hack :computer:
Should work, just going to test it on a debian box
Seems to work on Debian 7.
I don't have time to test this week (I'm going to a conference), so I'll go ahead and merge this in and we can wait to see if anyone has problems.
Thanks for you work @JamieH!
FastCGI now uses the socket instead of the port. Might need a check if wheezy or squeeze or to change both fastcgi config and PHP config