Advertisement
Guest User

Untitled

a guest
Oct 7th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 KB | None | 0 0
  1. GET `/moduletwo/index.php/LFiveRoute HTTP/1.1" 404 27 "http://www.Laravel.dev/LFourRoute`
  2.  
  3. FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.22.0.1, server: www.Laravel.dev, request: "GET /moduletwo/index.php/LFiveRoute HTTP/1.1", upstream: "fastcgi://172.22.0.5:9000", host: "www.Laravel.dev", referrer: "http://www.Laravel.dev/LFourRoute
  4.  
  5. /var/www/Laravel4/public/moduletwo/index.php > GET /moduletwo/index.php/LFiveRoute HTTP/1.1
  6.  
  7. ps -ef | grep 'nginx'
  8. root 1 0 0 06:15 ? 00:00:00 nginx: master process nginx -g daemon off;
  9. www-data 7 1 0 06:16 ? 00:00:00 nginx: worker process
  10. root 19 8 0 07:45 ? 00:00:00 grep nginx
  11.  
  12. ps -ef | grep 'fpm'
  13. root 21 8 0 07:47 ? 00:00:00 grep fpm
  14.  
  15. none
  16.  
  17. ps -ef | grep fpm
  18. root 1 0 0 06:15 ? 00:00:00 php-fpm: master process (/usr/local/etc/php-fpm.conf)
  19. www-data 8 1 0 06:16 ? 00:00:01 php-fpm: pool www
  20. www-data 9 1 0 06:17 ? 00:00:01 php-fpm: pool www
  21. www-data 10 1 0 06:22 ? 00:00:01 php-fpm: pool www
  22. root 22 13 0 07:49 ? 00:00:00 grep fpm
  23.  
  24. version: '2'
  25. services:
  26. nginx:
  27. container_name:
  28. Laravel-nginx
  29. restart: always
  30. build:
  31. context: ./
  32. dockerfile: deploy/web.docker
  33. volumes:
  34. - ./:/var/www/Laravel4
  35. - ./../Laravel_5:/var/www/Laravel5
  36. - ./app/storage/logs/nginx:/var/log/nginx
  37. ports:
  38. - "80:80"
  39. links:
  40. - php71
  41. networks:
  42. Laravel_net:
  43. ipv4_address: 172.22.0.2
  44. database:
  45. container_name:
  46. Laravel-db
  47. restart: always
  48. image: mysql:5.7
  49. environment:
  50. - "MYSQL_ROOT_PASSWORD=secret"
  51. - "MYSQL_ROOT_USER=root"
  52. - "MYSQL_DATABASE=laravel_4"
  53. ports:
  54. - "3309:3306"
  55.  
  56. networks:
  57. Laravel_net:
  58. ipv4_address: 172.22.0.3
  59. redis:
  60. container_name:
  61. Laravel-redis
  62. image: redis:3.2
  63. ports:
  64. - "6372:6379"
  65. networks:
  66. Laravel_net:
  67. ipv4_address: 172.22.0.4
  68.  
  69. php71:
  70. container_name:
  71. Laravel-php-71
  72. restart: always
  73. build:
  74. context: ./
  75. dockerfile: deploy/app.docker
  76. volumes:
  77. - ./:/var/www/Laravel4
  78. - ./../Laravel_5:/var/www/Laravel5
  79. links:
  80. - database
  81. - redis
  82. environment:
  83. - "DB_PORT=3306"
  84. - "DB_HOST=database"
  85. networks:
  86. Laravel_net:
  87. ipv4_address: 172.22.0.5
  88.  
  89. networks:
  90. Laravel_net:
  91. driver: bridge
  92. ipam:
  93. driver: default
  94. config:
  95. - subnet: 172.22.0.0/16
  96. gateway: 172.22.0.1
  97.  
  98. FROM nginx:1.10
  99.  
  100. EXPOSE 80
  101. EXPOSE 443
  102.  
  103. ADD ./deploy/vhost.conf /etc/nginx/conf.d/default.conf
  104. ADD ./deploy/nginx.conf /etc/nginx/nginx.conf
  105. WORKDIR /var/www
  106.  
  107. FROM php:7.0-fpm
  108.  
  109. RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client
  110. && docker-php-ext-install mcrypt pdo_mysql
  111.  
  112. WORKDIR /var/www
  113.  
  114. user www-data;
  115. worker_processes 1;
  116. pid /var/run/nginx.pid;
  117.  
  118. error_log /var/log/nginx/error.log warn;
  119.  
  120.  
  121. events {
  122. # A single worker process can handle 1024 connections
  123. worker_connections 1024;
  124. }
  125.  
  126.  
  127. http {
  128. include /etc/nginx/mime.types;
  129. default_type application/octet-stream;
  130.  
  131. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  132. '$status $body_bytes_sent "$http_referer" '
  133. '"$http_user_agent" "$http_x_forwarded_for"';
  134.  
  135. access_log /var/log/nginx/access.log main;
  136.  
  137. log_format scripts '$document_root$fastcgi_script_name > $request';
  138. access_log /var/log/nginx/scripts.log scripts;
  139.  
  140. sendfile on;
  141. #tcp_nopush on;
  142.  
  143. keepalive_timeout 65;
  144.  
  145. #gzip on;
  146.  
  147. # Load config files from the /etc/nginx/conf.d directory
  148. # The default server is in conf.d/default.conf
  149. include /etc/nginx/conf.d/*.conf;
  150. }
  151.  
  152. server {
  153. listen 80;
  154. server_name www.laravel.dev;
  155.  
  156. charset utf-8;
  157. sendfile off;
  158. client_max_body_size 100m;
  159. index index.php;
  160.  
  161. root /var/www/Laravel4/public;
  162.  
  163. location ~ ^/moduletwo/(.+(?:css|js|woff|woff2|ttf))$ {
  164. include fastcgi_params;
  165. alias /var/www/Laravel5/public/$1;
  166. #access_log off;
  167. }
  168.  
  169. #moduletwo code in laravel5
  170. location /moduletwo/ {
  171. include fastcgi_params;
  172. alias /var/www/Laravel5/public;
  173. ## Check for file existing and if there, stop ##
  174. if (-f $request_filename) {
  175. break;
  176. }
  177.  
  178. ## Check for file existing and if there, stop ##
  179. if (-d $request_filename) {
  180. break;
  181. }
  182. index index.php;
  183. try_files $uri $uri/ @moduletwo;
  184. # try_files $uri $uri/ /index.php?$query_string;
  185. }
  186.  
  187. location @moduletwo {
  188. include fastcgi_params;
  189. rewrite /moduletwo/(.*)$ /moduletwo/index.php?/$1 last;
  190. }
  191.  
  192. location ~ .php$ {
  193. fastcgi_split_path_info ^(.+.php)(/.+)$;
  194. fastcgi_pass php71:9000;
  195. fastcgi_index index.php;
  196. set $php_root /var/www/Laravel4/public;
  197. if ($request_uri ~ /moduletwo) {
  198. set $php_root /var/www/Laravel5/public;
  199. }
  200. fastcgi_param PATH_TRANSLATED $php_root/index.php;
  201.  
  202. fastcgi_param SCRIPT_FILENAME $request_filename;
  203. fastcgi_param REMOTE_ADDR $http_x_real_ip;
  204. include fastcgi_params;
  205. fastcgi_intercept_errors off;
  206. fastcgi_buffer_size 128k;
  207. fastcgi_buffers 256 16k;
  208. fastcgi_max_temp_file_size 0;
  209. fastcgi_read_timeout 310;
  210. }
  211.  
  212. location / {
  213. try_files $uri $uri/ /index.php?$query_string;
  214. }
  215.  
  216. location ~ /.ht {
  217. deny all;
  218. }
  219. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement