mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 07:12:54 -04:00
34 lines
1.2 KiB
Nginx Configuration File
34 lines
1.2 KiB
Nginx Configuration File
# inside a http section
|
|
# replace the several paths and names
|
|
server {
|
|
listen 80;
|
|
server_name servername;
|
|
|
|
access_log /path/to/log/file;
|
|
|
|
location /media {
|
|
root /path/to/sites/siteYY/;
|
|
# I use a symbolic link called "admin" in the media/ folder
|
|
# (pointing to /usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/ in my case)
|
|
# as suggested in http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#serving-the-admin-files
|
|
# so that nginx serves the django admin media files with the parameter
|
|
# ADMIN_MEDIA_PREFIX set to '/media/admin/' in settings.py
|
|
}
|
|
|
|
location / {
|
|
fastcgi_pass unix:RUNFILES_PATH/siteYY.socket;
|
|
# for a TCP host/port:
|
|
# fastcgi_pass {hostname}:{port};
|
|
|
|
# necessary parameter
|
|
fastcgi_param PATH_INFO $fastcgi_script_name;
|
|
|
|
# to deal with POST requests
|
|
fastcgi_param REQUEST_METHOD $request_method;
|
|
fastcgi_param CONTENT_TYPE $content_type;
|
|
fastcgi_param CONTENT_LENGTH $content_length;
|
|
|
|
# http://stackoverflow.com/questions/605173/how-to-nginx-virtual-servers-fcgi-for-django uses many other parameters,
|
|
# some may be necessary in some situations
|
|
}
|
|
}
|