Category : nginx-location

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 have made a php website without framework and I’ve used the router of https://grafikart.fr/tutoriels/router-628 ! With Apache and a .htaccess all is ok++ but unfortunately I have to use nginx ! My index.php is: <?php if ($_COOKIE[‘lang’] == ‘fr’) include ‘./src/lang/fr.php’; else include ‘./src/lang/en.php’; require ‘./vendor/autoload.php’; $router = new AppRouterRouter($_GET[‘url’]); include ‘./src/views/layouts/header.php’; $router->get(‘/’, "Home#show"); ..

Read more

I cant understand any details for config file of Nginx. I have 2 strings in location with include and fastcgi_pass.https://i.stack.imgur.com/mEMdU.png Why after location and before brackets should I use ~ .php? Does it use all my files.php in all my directories or only these files.php what are situated in the root? How does this location ..

Read more

hello I have this security line which blocks access to the php file in /wp-content/ location ~* (/wp-content/.*.php|/wp-includes/.*.php|/xmlrpc.php$|/(?:uploads|files)/.*.php$) { deny all; access_log off; log_not_found off; return 444; } I would like to allow access to a php file /wp-content/plugins/name_plugin/includes/php_file.php i tried location /wp-content/plugins/name_plugin/includes/php_file.php { allow all; return 403; } but it doesn’t work it just ..

Read more

I’ve directory say mobile /var/www/mobile That directory has multiple subdirectories like /android /ios and those directories have multiple PHP files I’d like to run those PHP files like this https://www.example.com/mobile/android/index.php https://www.example.com/mobile/android/products.php https://www.example.com/mobile/ios/products.php https://www.example.com/mobile/ios/feeds.php I want to allow these files in a single location block as many directories may be created in the future and don’t ..

Read more