| How To Install Nginx With PHP 5.3 Support On Ubuntu 10.04 LTS Lucid |
|
|
|
| How To - Nginx | |
| Written by Christian Foronda | |
| Thursday, 30 June 2011 17:30 | |
|
This tutorial is tested only on Ubuntu Server 10.04 LTS Lucid but also might work on other Ubuntu versions. I assume that you have a fresh install of Ubuntu Server 10.04 LTS Lucid. Update your packages: # aptitude update # aptitude safe-upgrade
Install nginx: # aptitude -y install python-software-properties # add-apt-repository ppa:nginx/stable # aptitude update # aptitude -y install nginx
Install PHP5 and other required modules: # add-apt-repository ppa:brianmercer/php # aptitude update # aptitude -y install php5 php5-mysql php5-fpm php5-suhosin
Configure nginx: # vi /etc/nginx/sites-enabled/default
On line 65, uncomment the following: location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
Restart nginx and php5-fpm: # /etc/init.d/nginx restart # /etc/init.d/php5-fpm restart
Create phpinfo script to access it from your browser: # echo "<?php phpinfo(); ?>" > /usr/share/nginx/www/info.php
Go to your browser and access: http://localhost/info.php
Similar articles
|
|
| Last Updated on Thursday, 30 June 2011 21:33 |


