Lando recipe don't create php.ini file - lando

lando.yml create a folder instead a file php.ini in wordpress recipe
This is my code:
name: projName
recipe: wordpress
config:
php: "8.0"
webroot: .
via: nginx
xdebug: true
config:
php: config/php.ini
it returns a php.ini directory instead php.ini file

Related

Problems setting root for cacti installation (nginx)

I'm having some problems getting my cacti installation to work. My root for content is /var/www/html. In this directory I have a subfolder "cacti" that points to /usr/share/cacti/site. In my /etc/nginx/sites-available/default file I have added this section to the "server" block:
location /cacti {
root cacti;
index index.php index.html index.htm;
}
I get a 404 when I go to mydomain.com/cacti
Where is (are) my mistakes with this config?

500 Internal Server Error when moving Yii project to cPanel

I have some problem when moving Yii project folder to public_html in cPanel File Manager. In localhost http://localhost:8888/eKehadiran/index.php it works fine, but when i'm moving the project to public_html and run ekehadiran.com/index.php, the ERROR was appear.
This is some related file on public_html:
.htaccess
AddHandler application/x-httpd-php54 .php .php5 .php4 .php3
index.php
<?php
// change the following paths if necessary
$yii=dirname(__FILE__).'/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
require_once($yii);
Yii::createWebApplication($config)->run();
What error are you getting in error_logs file ? Please check that and try to disable that .htaccess line.
try adding following lines in index.php
<?php
error_reporting(-1);
ini_set('display_errors', true);
// change the following paths if necessary
it should show you the error

Nginx - Configuration inside a webroot directory

How can I create a configuration file on a directory inside the webroot directory if I can't or don't want to set it up on sites-enable/domain.tld?
Just like in Apache, we can set up a .htaccess inside a directory.

Unable to access assets folder in Codeigniter

My directory structure is as follows:
-application
-system
-assets
--images
--downloads
--css
index.php
I created assets as suggested on stackoverflow,I wanted to restrict access to downloads so placed .htaccess file in assets folder with the following directive
Deny from all
now its protected but as assets has css files and those are also not accessible too.
Try to put the htaccess file to downloads file

NGINX: Returning 403 on .php files

I'm trying to serve the static files from a Wordpress installation and I'm using a symbolic link placed in the NGINX folder pointing to the wp-content/uploads folder.
Every file is being served correctly, but unfortunately there are some plugins that include some of their .php files inside this folder, so NGINX serve them as static files, leading to potential security risks.
Is there any way to instruct NGINX to return a Forbidden 403 error when trying to access .php files?
Thanks in advance.
You can exclude an extension under a location block using a sub location
E.G.
location /wp-content/uploads {
location ~ \.(php|any|other|ext)$ {
return 403;
}
....
}

Resources