GCC Official App - Servie API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

316 lines
9.9 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. ##
  2. # You should look at the following URL's in order to grasp a solid understanding
  3. # of Nginx configuration files in order to fully unleash the power of Nginx.
  4. # https://www.nginx.com/resources/wiki/start/
  5. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  6. # https://wiki.debian.org/Nginx/DirectoryStructure
  7. #
  8. # In most cases, administrators will remove this file from sites-enabled/ and
  9. # leave it as reference inside of sites-available where it will continue to be
  10. # updated by the nginx packaging team.
  11. #
  12. # This file will automatically load configuration files provided by other
  13. # applications, such as Drupal or Wordpress. These applications will be made
  14. # available underneath a path with that package name, such as /drupal8.
  15. #
  16. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  17. ##
  18. # Default server configuration
  19. #
  20. server {
  21. #listen 80 default_server;
  22. #listen [::]:80 default_server;
  23. # SSL configuration
  24. #
  25. listen 443 ssl;
  26. listen [::]:443 ssl;
  27. ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
  28. ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
  29. ssl_protocols TLSv1.2 TLSv1.3;
  30. # listen 443 ssl default_server;
  31. # listen [::]:443 ssl default_server;
  32. #
  33. # Note: You should disable gzip for SSL traffic.
  34. # See: https://bugs.debian.org/773332
  35. #
  36. # Read up on ssl_ciphers to ensure a secure configuration.
  37. # See: https://bugs.debian.org/765782
  38. #
  39. # Self signed certs generated by the ssl-cert package
  40. # Don't use them in a production server!
  41. #
  42. # include snippets/snakeoil.conf;
  43. root /var/www/html;
  44. # Add index.php to the list if you are using PHP
  45. index index.php index.html index.htm index.nginx-debian.html;
  46. server_name _;
  47. location / {
  48. if ($server_port = 8061) {
  49. return 301 http://localhost/maintenance.html;
  50. }
  51. # First attempt to serve request as file, then
  52. # as directory, then fall back to displaying a 404.
  53. try_files $uri $uri/ =404;
  54. }
  55. # PHPMyadmin
  56. location /phpmyadmin {
  57. proxy_pass http://localhost/phpmyadmin;
  58. proxy_buffering off;
  59. proxy_set_header X-Real-IP $remote_addr;
  60. proxy_set_header X-Forwarded-Host $host;
  61. proxy_set_header X-Forwarded-Port $server_port;
  62. }
  63. #MyPortal
  64. location /myportal {
  65. proxy_pass http://localhost/myportal/public/index.php;
  66. proxy_buffering off;
  67. proxy_set_header X-Real-IP $remote_addr;
  68. proxy_set_header X-Forwarded-Host $host;
  69. proxy_set_header X-Forwarded-Port $server_port;
  70. location /myportal/public/css {
  71. alias /var/www/html/myportal/public/css;
  72. }
  73. location /myportal/public/vendor {
  74. alias /var/www/html/myportal/public/vendor;
  75. }
  76. location /myportal/public/index.php/user-uploads {
  77. alias /var/www/html/myportal/public/user-uploads;
  78. }
  79. }
  80. location /myportal/public/css {
  81. # alias /var/www/html/myportal/public/css;
  82. }
  83. location /myportal/public/vendor {
  84. # alias /var/www/html/myportal/public/vendor;
  85. }
  86. location /myportal/public/index.php/user-uploads {
  87. # alias /var/www/html/myportal/public/user-uploads;
  88. }
  89. # Pet reg
  90. location /pet {
  91. proxy_pass http://localhost:8061;
  92. proxy_buffering off;
  93. proxy_set_header X-Real-IP $remote_addr;
  94. proxy_set_header X-Forwarded-Host $host;
  95. proxy_set_header X-Forwarded-Port $server_port;
  96. }
  97. # Define a location block to serve files from the /home/mm/projects directory
  98. # location /files/ {
  99. # alias /home/mm/projects/;
  100. # autoindex on; # Enable directory listing if needed
  101. # }
  102. # Block access to files in /home/mm/projects directory
  103. location /files/ {
  104. deny all;
  105. return 403;
  106. }
  107. # Allow your web application to serve files from /home/mm/projects directory
  108. location /gcc/upload_files/ {
  109. alias /home/mm/projects/;
  110. }
  111. # Makkaludan Mudhalvar
  112. location /mm {
  113. proxy_pass http://localhost:8070;
  114. proxy_buffering off;
  115. proxy_set_header X-Real-IP $remote_addr;
  116. proxy_set_header X-Forwarded-Host $host;
  117. proxy_set_header X-Forwarded-Port $server_port;
  118. location /mm/assets/ {
  119. #proxy_pass http://localhost:8070/assets/;
  120. }
  121. }
  122. # CM Dashboard
  123. location /cm {
  124. proxy_pass http://localhost:8066;
  125. proxy_buffering off;
  126. proxy_set_header X-Real-IP $remote_addr;
  127. proxy_set_header X-Forwarded-Host $host;
  128. proxy_set_header X-Forwarded-Port $server_port;
  129. }
  130. # GCC PlayStore Support
  131. location /support {
  132. proxy_pass http://localhost:8069;
  133. proxy_buffering off;
  134. proxy_set_header X-Real-IP $remote_addr;
  135. proxy_set_header X-Forwarded-Host $host;
  136. proxy_set_header X-Forwarded-Port $server_port;
  137. location /support/assets/ {
  138. proxy_pass http://localhost:8069/assets/;
  139. }
  140. location /support/feedback/ {
  141. proxy_pass http://localhost:8069/feedback/;
  142. }
  143. }
  144. # GCC Official App Mobile (gccofficialapp)
  145. location /gccofficialapp {
  146. proxy_pass http://localhost:8067;
  147. proxy_buffering off;
  148. proxy_set_header X-Real-IP $remote_addr;
  149. proxy_set_header X-Forwarded-Host $host;
  150. proxy_set_header X-Forwarded-Port $server_port;
  151. location /gccofficialapp/assets/ {
  152. proxy_pass http://localhost:8067/assets/;
  153. }
  154. location /gccofficialapp/feedback/ {
  155. proxy_pass http://localhost:8067/feedback/;
  156. }
  157. }
  158. # Makkalai Thedi Mayor
  159. location /mtm {
  160. proxy_pass http://localhost:8060;
  161. proxy_buffering off;
  162. proxy_set_header X-Real-IP $remote_addr;
  163. proxy_set_header X-Forwarded-Host $host;
  164. proxy_set_header X-Forwarded-Port $server_port;
  165. location /mtm/assets/ {
  166. proxy_pass http://localhost:8060/assets/;
  167. }
  168. location /mtm/login {
  169. proxy_pass http://localhost:8060/login;
  170. }
  171. location /mtm/api/ {
  172. proxy_pass http://localhost:8060/api/;
  173. }
  174. }
  175. # QR Service - GCC Asset Feedback
  176. location /qrfeedback {
  177. proxy_pass http://localhost:8065/public-feedback;
  178. proxy_buffering off;
  179. proxy_set_header X-Real-IP $remote_addr;
  180. proxy_set_header X-Forwarded-Host $host;
  181. proxy_set_header X-Forwarded-Port $server_port;
  182. location /qrfeedback/assets/ {
  183. proxy_pass http://localhost:8065/assets/;
  184. }
  185. location /qrfeedback/api/ {
  186. proxy_pass http://localhost:8065/api/;
  187. }
  188. }
  189. # GCC Portal
  190. location /gcc {
  191. proxy_pass http://localhost:8064/gcc;
  192. proxy_connect_timeout 120s;
  193. proxy_read_timeout 240s;
  194. proxy_send_timeout 10s;
  195. proxy_buffering off;
  196. proxy_set_header X-Real-IP $remote_addr;
  197. proxy_set_header X-Forwarded-Host $host;
  198. proxy_set_header X-Forwarded-Port $server_port;
  199. location /gcc/assets/ {
  200. proxy_pass http://localhost:8064/assets/;
  201. }
  202. #For Upload file
  203. location /gcc/uploads/ {
  204. alias /home/mm/projects/gccoffice_uploads/;
  205. #autoindex on; # Enable directory listing if needed
  206. }
  207. }
  208. # Election Portal
  209. location /election {
  210. proxy_pass http://localhost:8065/election;
  211. proxy_connect_timeout 120s;
  212. proxy_read_timeout 240s;
  213. proxy_send_timeout 10s;
  214. proxy_buffering off;
  215. proxy_set_header X-Real-IP $remote_addr;
  216. proxy_set_header X-Forwarded-Host $host;
  217. proxy_set_header X-Forwarded-Port $server_port;
  218. location /election/assets/ {
  219. proxy_pass http://localhost:8065/assets/;
  220. }
  221. #For Upload file
  222. location /election/uploads/ {
  223. alias /home/mm/projects/election_uploads/;
  224. #autoindex on; # Enable directory listing if needed
  225. }
  226. }
  227. # Hall Booking
  228. location /communityhall {
  229. proxy_pass http://localhost:8062;
  230. proxy_buffering off;
  231. proxy_set_header X-Real-IP $remote_addr;
  232. proxy_set_header X-Forwarded-Host $host;
  233. proxy_set_header X-Forwarded-Port $server_port;
  234. location /communityhall/assets/ {
  235. proxy_pass http://localhost:8062/assets/;
  236. }
  237. #For Upload file
  238. location /communityhall/images/ {
  239. alias /home/mm/projects/communityHallDocuments/;
  240. #autoindex on; # Enable directory listing if needed
  241. }
  242. }
  243. #location /support/assets/ {
  244. # proxy_pass http://localhost:8069/assets/;
  245. # proxy_buffering off;
  246. # proxy_set_header X-Real-IP $remote_addr;
  247. # proxy_set_header X-Forwarded-Host $host;
  248. # proxy_set_header X-Forwarded-Port $server_port;
  249. #}
  250. # pass PHP scripts to FastCGI server
  251. #
  252. #location ~ \.php$ {
  253. # include snippets/fastcgi-php.conf;
  254. #
  255. # # With php-fpm (or other unix sockets):
  256. # fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  257. # # With php-cgi (or other tcp sockets):
  258. # fastcgi_pass 127.0.0.1:9000;
  259. #}
  260. # deny access to .htaccess files, if Apache's document root
  261. # concurs with nginx's one
  262. #
  263. #location ~ /\.ht {
  264. # deny all;
  265. #}
  266. }
  267. # Virtual Host configuration for example.com
  268. #
  269. # You can move that to a different file under sites-available/ and symlink that
  270. # to sites-enabled/ to enable it.
  271. #
  272. #server {
  273. # listen 80;
  274. # listen [::]:80;
  275. #
  276. # server_name example.com;
  277. #
  278. # root /var/www/example.com;
  279. # index index.html;
  280. #
  281. # location / {
  282. # try_files $uri $uri/ =404;
  283. # }
  284. #}