Curious if anyone has tried to run DSP under Nginx? Seems out of the box, only Apache is supported at this time. Nginx is my web server of preference, would be great to run on that web server as well.
I’m imagining the work is primarily in Nginx configuration, to respect the same rewrite rules that .htaccess provides under Apache. If this hasn’t been experimented with yet, I may take a crack at converting Apache config to Nginx. Would love to hear thoughts, potential pitfalls or prior experiences.
Apologies on the delay in response, we’ve been on vacation overseas with limited access to Internet. Looking forward to testing this out in the weeks ahead.
At first read, I thought this was a Nginx proxy configuration, which I have set up today and works quite well. Looks like Jerry removed the proxy configuration for direct PHP processing which is exciting and the solution I was seeking. As soon as the time becomes available, I’ll make sure to implement from these great instructions and report back on the results.
Hi there - still working through this, seem to be getting close on config, however getting an error:
Fatal error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) in /var/www/[website]/vendor/kisma/kisma/src/Kisma/Core/Exceptions/SeedException.php on line 64
I’m sure it is my web server config, maybe missing a requirement or so. I’ll keep plugging away as time permits.
Just gave this another run through with 1.7.6. I got this to work and it works really well under Nginx!!
Only minor feedback I have is the team may want to consider cleaning up the Apache language under the wiki article: https://github.com/dreamfactorysoftware/dsp-core/wiki/Configuring-nginx. My config is running 100% under Nginx, no Apache installed on my virtual box whatsoever. For the other users which will attempt Nginx + DSP, the Apache text may lead them to believe Nginx is a proxy to Apache, however this works really well with just Nginx (thereby saving a lot of overhead on small 512 MB virtual boxes).
Mega thanks to Jerry for putting this together!!!
Also, I haven’t fully tested to see if there are any downsides to this, but I was able to run one config for both HTTP 80 and HTTPS 443. Is easier for me to read the config, I’ll share below if helpful to others:
I’ve been working on some better configuration examples for nginx. My goal in that wiki page was to set up an nginx proxy to an apache back-end so a varnish cache could be easily utilized. In addition, as you stated, SSL runs only on nginx and apache can be on a single port. Mainly, I wanted to provide a method to incorporate nginx into a default DSP installation.
You can ABSOLUTELY run without apache. It works fine and is faster. That said, I’ve created sample configurations for this scenario and they are currently in the develop branch of the dsp-core repo.
As for combining the configs into a single server, I am not sure. My nginx kung fu is weak in that area. But if you get it to work, please let me know. As it stands now, there is a single config file with two servers defined, http and https. This is in the config examples in the repo.
We will be pushing a new 1.7 update this week (hopefully) to address this and a few other minor issues found since release. I’ll update the wiki to better explain the purpose, and create a second page for a stand-alone nginx config. Cool?
Jason, I put together of set of nginx configs and some basic doc.
The files are all under the config/exernal/nginx directory in the repo. Drill down to the sites-available directory where one will find two example server configs.
The first (dsp.multi.local) defines two server clauses. One for http, and one for https.
The second (dsp.single.local) defines a single server clause (per your suggestion above).
The configs mentioned above depend on a few other files in that tree, so be aware and RTFW.
P.S. I’ve tested it on my box, on EC2, and a few PaaS systems. Works very well. Thanks for the suggestion!