0% found this document useful (0 votes)
38 views

Phalcon Nginx 2

This document contains configuration settings for the nginx web server. It defines a single server that listens on port 80, sets the document root to a specific directory for serving files, and configures PHP processing through FastCGI. Additional locations are defined for caching files like images, CSS, and JavaScript separately from dynamic content.

Uploaded by

ngeranjing
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Phalcon Nginx 2

This document contains configuration settings for the nginx web server. It defines a single server that listens on port 80, sets the document root to a specific directory for serving files, and configures PHP processing through FastCGI. Additional locations are defined for caching files like images, CSS, and JavaScript separately from dynamic content.

Uploaded by

ngeranjing
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#user nobody;

worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '


# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;

server_name localhost;

index index.php index.html index.htm;

root C:/nginx/html/zicare/public;

try_files $uri $uri/ @rewrite;

location @rewrite {
rewrite ^(.*)$ /index.php?_url=$1;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9123;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root C:/nginx/html/zicare/public;
}

location ~ /\.ht {
deny all;
}
}

# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}

# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

You might also like