You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-4Lines changed: 56 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,23 +56,75 @@ $application = (new ApplicationFactory)->createApplication($kernel);
56
56
$application->run();
57
57
```
58
58
59
+
## Server Configuration
60
+
61
+
### NGINX
62
+
63
+
With NGINX, you need to use a process manager such as [supervisord](http://supervisord.org/) to manage instances of your application. Have a look at [AstroSplash](http://astrosplash.com/) for an [example supervisord configuration](https://github.com/AndrewCarterUK/AstroSplash/blob/master/supervisord.conf).
64
+
65
+
Below is an example of the modification that you would make to the [Symfony NGINX configuration](https://www.nginx.com/resources/wiki/start/topics/recipes/symfony/). The core principle is to replace the PHP-FPM reference with one to a cluster of workers.
66
+
67
+
```nginx
68
+
# This shows the modifications that you would make to the Symfony NGINX configuration
If you wish to configure your FastCGI application to work with the apache web server, you can use the apache FastCGI module to process manage your application.
60
94
61
95
This can be done by creating a FCGI script that launches your application and inserting a FastCgiServer directive into your virtual host configuration.
62
96
97
+
Here is an example `script.fcgi`:
98
+
63
99
```sh
64
100
#!/bin/bash
65
-
php /path/to/command.php run
101
+
php /path/to/application.php run
66
102
```
67
103
104
+
Or with Symfony:
105
+
106
+
```sh
107
+
#!/bin/bash
108
+
php /path/to/bin/console speedfony:run --env=prod
109
+
```
110
+
111
+
In your configuration, you can use the [FastCgiServer](https://web.archive.org/web/20150913190020/http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html#FastCgiServer) directive to inform Apache of your application.
112
+
68
113
```
69
-
FastCgiServer /path/to/web/root/script.fcgi
114
+
FastCgiServer /path/to/script.fcgi
70
115
```
71
116
72
117
By default, the daemon will listen on FCGI_LISTENSOCK_FILENO, but it can also be configured to listen on a TCP address. For example:
73
118
119
+
74
120
```sh
75
-
php /path/to/command.php run --port=5000 --host=localhost
121
+
#!/bin/bash
122
+
php /path/to/application.php run --port=5000 --host=localhost
76
123
```
77
124
78
-
If you are using a web server such as NGINX, you will need to use a process manager to monitor and run your application.
0 commit comments