server { # listen 80; # default_server; # listen [::]:80 default_server; # server_name _; server_name code.algometic.com books.algometic.com ocd.algometic.com metrics.algometic.com 58985620.algometic.com; # location / { # proxy_pass http://192.168.1.124:443; # } return 301 https://$host$request_uri; } server { listen 80 default_server; server_name algometic.com www.algometic.com; access_log /var/log/nginx/algometic.access.log main; root /var/www/html/algometic; index index.php index.html index.htm; client_max_body_size 64M; # client_max_body_size 0; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } location /img/ { autoindex on; } }