blog.notmyidea.org/content/code/2010-10-10-php5-nginx.md
Alexis Métaireau 9df3b183b6 Enhanced UI & UX; Added New ISBN Plugin.
- Added the ability to display book cover for the category "Lectures" if ISBN cover is available.
- Moved author's name into a small tag for better hierarchy and readability.
- Implemented a feature to indicate link sizes depending on the number of articles associated with a given tag.
- Implemented a mini footer element displaying an RSS feed icon.
- Improved category display using description dictionary.
- Added a new plugin "isbn_downloader" to fetch ISBN information when needed.
- Included the count of articles for each category.
- Implemented changes for better layout and readability of tags and categories.
- Adjusted the layout of the webpage, improving the overall look of the page.
- Included "requests" in the requirements.txt for supplanting dependencies required by the new plugin and/or features.
2023-09-29 18:30:09 +02:00

57 lines
1.4 KiB
Markdown

# How to install NGINX + PHP 5.3 on FreeBSD.
- date
2010-10-10
- category
tech
I've not managed so far to get completely rid of php, so here's a simple
reminder about how to install php on NGINX, for FreeBSD. Nothing hard,
but that's worse to have the piece of configuration somewhere \!
# update the ports
$ portsnap fetch update
# install php5 port
$ make config-recursive -C /usr/ports/lang/php5-extensions
$ make package-recursive -C /usr/ports/lang/php5-extensions
# install nginx
$ make config-recursive -C /usr/ports/www/nginx-devel
$ make package-recursive -C /usr/ports/www/nginx-devel
Now we have all the dependencies installed, we need to configure a bit
the server.
That's a simple thing in fact, but it could be good to have something
that will work without effort over time.
Here's a sample of my configuration:
server {
server_name ndd;
set $path /path/to/your/files;
root $path;
location / {
index index.php;
}
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
}
location ~ .php$ {
fastcgi_param SCRIPT_FILENAME $path$fastcgi_script_name;
fastcgi_pass backend;
include fastcgi_params;
}
}
upstream backend {
server 127.0.0.1:9000;
}
And that's it \!