Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeng Rosanda committed Mar 8, 2020
0 parents commit 4498c0c
Show file tree
Hide file tree
Showing 10 changed files with 2,118 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php phpinfo(); ?>
53 changes: 53 additions & 0 deletions conf/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
server {
listen 80;
server_name _;
root /var/www/html/;
index index.php;
client_max_body_size 32M;

#error Log
error_log /dev/stdout info;
access_log /dev/stdout;


location / {
#autoindex on;
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(ico|js|css|jpg|jpeg|gif|png){
log_not_found off;
access_log off;
add_header ETag "";
if (-f $request_filename) {
expires max;
break;
}
}
location ~ /(app|downloader|includes|pkginfo|var|errors/local.xml)/ {
deny all;
}
location ~ .*postman.json$ {
expires -1;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
}
location ~ .*api_mobile/seller/waybill/print/$ {
expires -1;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
}
location ~ .*media/order/$ {
expires -1;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
}
location ~ \.php$ {
include fastcgi.conf;
fastcgi_intercept_errors off;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_read_timeout 1000;
fastcgi_param ENVIRONMENT production;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}
19 changes: 19 additions & 0 deletions conf/fastcgi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
Empty file added conf/log.conf
Empty file.
39 changes: 39 additions & 0 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
worker_connections 1024;
}

http {
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 /var/log/nginx/access.log main;

sendfile off;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;

include /etc/nginx/mime.types;
default_type application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

}

Loading

0 comments on commit 4498c0c

Please # to comment.