Apart from Apache and IIS, on which web servers can PHP run? - php

I was looking for all possible alternatives for web servers apart from Apache and IIS for PHP to run, but didn't get.

You can try Nginx or Lighttpd.

Related

Is there anyway to use php-cgi with tomcat server?

I have a situation where a C/C++ application has a thread dedicated for nginx webserver and the thread and nginx server communicates via a specific port. This nginx server is configured to display the data (the data from the C/C++ application) on the webserver with the help of php-cgi. The port for php-cgi is different.
Is it possible to replace nginx server with tomcat server with minimal changes?
I came to know about php/java bridge while researching about it. I am not sure if that is the one I am looking for.
Please help.
Thanks
Edit: Any other cgi is okay as long as the data from the native C/C++ application is sent to webpages, but using tomcat server.

PHP in Go. FastCGI?

I am writing webserver in Go that will replace existing website. I still need some old PHP scripts. Right now I have lighttpd + fastcgi. So I wish my web server to call PHP as FastCGI.
What is best way to handle it?
I guess I need some Go FastCGI API
http://golang.org/pkg/net/http/fcgi/ - It seems only to support Server side not client.
I think you'd have to make your own if you want to connect directly to a fastcgi process. Keep in mind though that you still have to run a process manager/spawner anyway, so it wouldn't be a huge leap to just run nginx, too, and have your Go process proxy there for the PHP scripts.
You could also reasonably turn it around and have end-users connect to nginx on port 80 and have nginx proxy requests to your Go process or fastcgi as appropriate. One advantage of that is that then easily can have the Go process run as a different user than root.

Serving Python website on it's own server next to apache serving other websites

I have Apache server serving several PHP driven websites. I'm developing a websites in Python/Pyramid and want to host it on the same server. What options do I have available?
You have mod_wsgi, and you have running it as a separate daemon on a different port or interface.
Apacehe and mod_wsgi
Nginx and gunicorn
These are the two ways I've done it in the past.

running php with Nginx server

I am using apache server for php. So my doubt is can I use both Nginx and apache server for running on my system . Can be both server load on the systm? Thanks in advance
Although I don't see much benefit, but as long as they are listening to different ports, I don't see why not.
Here's a tutorial on how to setup php in nginx (just in case)
http://wiki.nginx.org/Configuration#PHP_via_FastCGI
If it were me, for evaluation purposes, I would just fire up one of my Virtual Machines and run nginx in the test environment of your choice.
http://www.virtualbox.org/

cURL proxy server

I've got two PC's, but both have another IP. The simple question is how to use one of the PC's as a proxy for the other one, by using cURL, so requests from both PC's will have the same IP.
Is there a way to turn one PC into a proxy server and then make cURL make requests using that IP?
Yes, there are lot's of proxy packages running out of the box (you could even configure apache to do it). Wouldn't recommend rolling your own in PHP if that's what you're after. You can configure curl easily to use a proxy, see the curl_setopt possibilities.
if you are runnning a webserver on each machine , then you can install a php proxy script.
see Google PHP Proxy search results : at least 4 choices on first page.
if you are not running a webserver. Then I suggest you download a standalone proxy such as squid.
This options works for windows or linux. You can download squid for windows here. just unzip and run squid, not setup required.

Categories