Advertisement
Guest User

nginx -T

a guest
Aug 30th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.04 KB | None | 0 0
  1. root@832f76903795:/# cat tmp/nginx-t.txt
  2. # configuration file /etc/nginx/nginx.conf:
  3.  
  4. user nginx;
  5. worker_processes 1;
  6.  
  7. error_log /var/log/nginx/error.log warn;
  8. pid /var/run/nginx.pid;
  9.  
  10.  
  11. events {
  12. worker_connections 1024;
  13. }
  14.  
  15.  
  16. http {
  17. include /etc/nginx/mime.types;
  18. default_type application/octet-stream;
  19.  
  20. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  21. '$status $body_bytes_sent "$http_referer" '
  22. '"$http_user_agent" "$http_x_forwarded_for"';
  23.  
  24. access_log /var/log/nginx/access.log main;
  25.  
  26. sendfile on;
  27. #tcp_nopush on;
  28.  
  29. keepalive_timeout 65;
  30.  
  31. #gzip on;
  32.  
  33. include /etc/nginx/conf.d/*.conf;
  34. }
  35.  
  36. # configuration file /etc/nginx/mime.types:
  37.  
  38. types {
  39. text/html html htm shtml;
  40. text/css css;
  41. text/xml xml;
  42. image/gif gif;
  43. image/jpeg jpeg jpg;
  44. application/javascript js;
  45. application/atom+xml atom;
  46. application/rss+xml rss;
  47.  
  48. text/mathml mml;
  49. text/plain txt;
  50. text/vnd.sun.j2me.app-descriptor jad;
  51. text/vnd.wap.wml wml;
  52. text/x-component htc;
  53.  
  54. image/png png;
  55. image/svg+xml svg svgz;
  56. image/tiff tif tiff;
  57. image/vnd.wap.wbmp wbmp;
  58. image/webp webp;
  59. image/x-icon ico;
  60. image/x-jng jng;
  61. image/x-ms-bmp bmp;
  62.  
  63. application/font-woff woff;
  64. application/java-archive jar war ear;
  65. application/json json;
  66. application/mac-binhex40 hqx;
  67. application/msword doc;
  68. application/pdf pdf;
  69. application/postscript ps eps ai;
  70. application/rtf rtf;
  71. application/vnd.apple.mpegurl m3u8;
  72. application/vnd.google-earth.kml+xml kml;
  73. application/vnd.google-earth.kmz kmz;
  74. application/vnd.ms-excel xls;
  75. application/vnd.ms-fontobject eot;
  76. application/vnd.ms-powerpoint ppt;
  77. application/vnd.oasis.opendocument.graphics odg;
  78. application/vnd.oasis.opendocument.presentation odp;
  79. application/vnd.oasis.opendocument.spreadsheet ods;
  80. application/vnd.oasis.opendocument.text odt;
  81. application/vnd.openxmlformats-officedocument.presentationml.presentation
  82. pptx;
  83. application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  84. xlsx;
  85. application/vnd.openxmlformats-officedocument.wordprocessingml.document
  86. docx;
  87. application/vnd.wap.wmlc wmlc;
  88. application/x-7z-compressed 7z;
  89. application/x-cocoa cco;
  90. application/x-java-archive-diff jardiff;
  91. application/x-java-jnlp-file jnlp;
  92. application/x-makeself run;
  93. application/x-perl pl pm;
  94. application/x-pilot prc pdb;
  95. application/x-rar-compressed rar;
  96. application/x-redhat-package-manager rpm;
  97. application/x-sea sea;
  98. application/x-shockwave-flash swf;
  99. application/x-stuffit sit;
  100. application/x-tcl tcl tk;
  101. application/x-x509-ca-cert der pem crt;
  102. application/x-xpinstall xpi;
  103. application/xhtml+xml xhtml;
  104. application/xspf+xml xspf;
  105. application/zip zip;
  106.  
  107. application/octet-stream bin exe dll;
  108. application/octet-stream deb;
  109. application/octet-stream dmg;
  110. application/octet-stream iso img;
  111. application/octet-stream msi msp msm;
  112.  
  113. audio/midi mid midi kar;
  114. audio/mpeg mp3;
  115. audio/ogg ogg;
  116. audio/x-m4a m4a;
  117. audio/x-realaudio ra;
  118.  
  119. video/3gpp 3gpp 3gp;
  120. video/mp2t ts;
  121. video/mp4 mp4;
  122. video/mpeg mpeg mpg;
  123. video/quicktime mov;
  124. video/webm webm;
  125. video/x-flv flv;
  126. video/x-m4v m4v;
  127. video/x-mng mng;
  128. video/x-ms-asf asx asf;
  129. video/x-ms-wmv wmv;
  130. video/x-msvideo avi;
  131. }
  132.  
  133. # configuration file /etc/nginx/conf.d/default.conf:
  134. server {
  135. listen 80;
  136. server_name localhost;
  137.  
  138. index index.php index.html;
  139. root /app/public;
  140.  
  141. location / {
  142. try_files $uri /index.php$is_args$args;
  143.  
  144. # https://stackoverflow.com/questions/31493634/laravel-routes-not-found-on-nginx
  145. #try_files $uri $uri/ /index.php?$query_string;
  146.  
  147. # Simple requests
  148. if ($request_method ~* "(GET|POST)") {
  149. add_header "Access-Control-Allow-Origin" * always;
  150. }
  151.  
  152. # Preflighted requests
  153. if ($request_method = OPTIONS ) {
  154. #add_header "Access-Control-Allow-Origin" * always;
  155.  
  156. add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
  157. add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
  158. return 200;
  159. }
  160. }
  161.  
  162. location ~ ^/index\.php(/|$) {
  163. try_files $uri =404;
  164.  
  165. # https://stackoverflow.com/questions/31493634/laravel-routes-not-found-on-nginx
  166. #try_files $uri $uri/ /index.php?$query_string;
  167.  
  168. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  169. fastcgi_pass laravel_vue_companies_php:9000;
  170. fastcgi_index index.php;
  171. include fastcgi_params;
  172. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  173. fastcgi_param PATH_INFO $fastcgi_path_info;
  174.  
  175. # Simple requests
  176. if ($request_method ~* "(GET|POST)") {
  177. #add_header "Access-Control-Allow-Origin" * always;
  178. }
  179.  
  180. # Preflighted requests
  181. if ($request_method = OPTIONS ) {
  182. #add_header "Access-Control-Allow-Origin" * always;
  183. add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
  184. add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
  185. return 200;
  186. }
  187. }
  188.  
  189. location ~ \.php$ {
  190. return 404;
  191. }
  192.  
  193. error_log /var/log/nginx/error.log;
  194. access_log /var/log/nginx/access.log;
  195. }
  196.  
  197. # by https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-laravel-with-nginx-on-ubuntu-20-04
  198. #server {
  199. # listen 80;
  200. # server_name localhost;
  201. # root /app/public;
  202. #
  203. # add_header X-Frame-Options "SAMEORIGIN";
  204. # add_header X-XSS-Protection "1; mode=block";
  205. # add_header X-Content-Type-Options "nosniff";
  206. #
  207. # index index.html index.htm index.php;
  208. #
  209. # charset utf-8;
  210. #
  211. # location / {
  212. # try_files $uri $uri/ /index.php?$query_string;
  213. # }
  214. #
  215. # location = /favicon.ico { access_log off; log_not_found off; }
  216. # location = /robots.txt { access_log off; log_not_found off; }
  217. #
  218. # error_page 404 /index.php;
  219. #
  220. # location ~ \.php$ {
  221. # fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
  222. # fastcgi_index index.php;
  223. # fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  224. # include fastcgi_params;
  225. # }
  226. #
  227. # location ~ /\.(?!well-known).* {
  228. # deny all;
  229. # }
  230. #}
  231.  
  232. # configuration file /etc/nginx/fastcgi_params:
  233.  
  234. fastcgi_param QUERY_STRING $query_string;
  235. fastcgi_param REQUEST_METHOD $request_method;
  236. fastcgi_param CONTENT_TYPE $content_type;
  237. fastcgi_param CONTENT_LENGTH $content_length;
  238.  
  239. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  240. fastcgi_param REQUEST_URI $request_uri;
  241. fastcgi_param DOCUMENT_URI $document_uri;
  242. fastcgi_param DOCUMENT_ROOT $document_root;
  243. fastcgi_param SERVER_PROTOCOL $server_protocol;
  244. fastcgi_param REQUEST_SCHEME $scheme;
  245. fastcgi_param HTTPS $https if_not_empty;
  246.  
  247. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  248. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  249.  
  250. fastcgi_param REMOTE_ADDR $remote_addr;
  251. fastcgi_param REMOTE_PORT $remote_port;
  252. fastcgi_param SERVER_ADDR $server_addr;
  253. fastcgi_param SERVER_PORT $server_port;
  254. fastcgi_param SERVER_NAME $server_name;
  255.  
  256. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  257. fastcgi_param REDIRECT_STATUS 200;
  258.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement