Category : nginx-config

I have setup and nginx base ec2 instance. This instance received request from AWS API Gateway. When I receive request in code then request has not received desired pattern headers User-Agent Required User-Agent Pattenr aws-sdk-android/2.22.6 Linux/3.18.14-14263629-QB33208447 Dalvik/2.1.0/0 en_US appVersion/128 apiVersion/4.5 device-id/([email protected]) df1, AmazonAPIGateway_n6t1xjtsb2 But when I receive request User-Agent is aws-sdk-android/2.22.6 Linux/3.18.14-14263629-QB33208447 Dalvik/2.1.0/0 en_US appVersion/128 ..

Read more

I am using the default config with Nginx installed on my manjaro machine. I just added some simple configurations down below. nginx.conf: user http; worker_processes auto; worker_cpu_affinity auto; ….. http{ ….. server { listen 9000; server_name localhost; root /usr/share/nginx/html/exam; location / { index index.php index.html index.htm; autoindex on; autoindex_exact_size off; autoindex_localtime on; if (!-e $request_filename){ ..

Read more

I was trying deploy laravel with nginx on Ubuntu 20.04. I’ve modified the /etc/nginx/sites-available/default and when I tried to restart the nginx service i encountered this problem. $ sudo systemctl restart nginx Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. $ journalctl ..

Read more

I have a PHP page which needs to load slowly. So I wrote something like: <?php set_time_limit(300); $sdt = gmdate(‘Y-m-d h:i:s GMT’, time()); if (isset($_GET[‘sleep’])) { // Delays for xxx seconds. sleep( intval($_GET[‘sleep’]) ); } $edt = gmdate(‘Y-m-d h:i:s GMT’, time()); echo $sdt . PHP_EOL; echo $edt . PHP_EOL; ?> Unfortunately, after 60 seconds I ..

Read more