Volodymyr Kostyrko-2 wrote:
>
> Peter Pluta wrote:
>
> nginx.conf snippet:
>
> server {
> listen *:80;
> server_name ...;
> root ...;
> access_log /var/log/nginx/....access.log;
> index index.php;
>
> location ~ .*\.php$ {
> include /usr/local/etc/nginx/fastcgi_params;
> fastcgi_pass unix:/tmp/.fastcgi.www/socket;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME ...$fastcgi_script_name;
> }
> }
>
> /usr/local/etc/rc.d/phpFcgid script:
>
> #!/bin/sh
>
> # PROVIDE: phpFcgid
> # REQUIRE: LOGIN
> # KEYWORD: shutdown
>
> . /etc/rc.subr
>
> name="phpFcgid"
> rcvar=`set_rcvar`
>
> load_rc_config $name
> : ${phpFcgid_enable="NO"}
> : ${phpFcgid_users="www"}
> : ${phpFcgid_children="2"}
>
> start_cmd=phpFcgid_start
> stop_cmd=phpFcgid_stop
>
> phpFcgid_start() {
> echo "Starting $name."
> export PHP_FCGI_CHILDREN=${phpFcgid_chidlren}
> for user in ${phpFcgid_users}; do
> socketdir="/tmp/.fastcgi.${user}"
> mkdir -p ${socketdir}
> chown ${user}:www ${socketdir}
> chmod 0750 ${socketdir}
> su -m ${user} -c "/usr/local/bin/php-cgi -b ${socketdir}/socket&"
> done
> }
>
> phpFcgid_stop() {
> echo "Stopping $name."
> pids=`pgrep php-cgi`
> pkill php-cgi
> wait_for_pids $pids
> }
>
> run_rc_command "$1"
>
> Also put this to your /etc/rc.conf file:
>
> phpFcgid_enable='yes'
>
> --
> Sphinx of black quartz judge my vow.
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "[EMAIL PROTECTED]"
>
>
Thanks Volodymyr, I appreciate it. Where would all of the FastCGI parameters
go, such as # of children, timeout values, etc.
--
View this message in context:
http://www.nabble.com/Nginx-%2B-FastCGI-%2B-PHP5-on-FreeBSD-6.2-tf4389129.html#a12533660
Sent from the freebsd-questions mailing list archive at Nabble.com.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"