Before I apply this fix, I want to know more about what happens when I use a custom conf. If, for example, I set sub1.domain.com.conf
to contain just a uSWGI proxy, will anything else, such as rewrite from http to https, also be set up? Or will it reset the entire local.conf
block for that subdomain to contain just the uWSGI app?
Can this still work with the recent update on MIAB
This isnât a supported feature and I continue to strongly advise against making modifications like this because enabling PHP like this could open your box up to serious security vulnerabilities if youâre not very careful. Websites should be hosted on a different server (and the Custom DNS page in the Mail-in-a-Box control panel can be used to make that possible).
Any new instructions on this? A lot has changed and paths dont align. I tried my best to follow along, but no luck
probably much easier to spin up another VPS to host your websites. $5 spent = not adding load to your mail server + security + less headache getting it set up.
No, Hosting PHP websites is not on the roadmap. Donât expect this project to ever do so as it is simply not within the scope of the project.
I get that, but Iâm sure someone has figured it out.
- I create a file named thanhnhua.vn.conf with follow content:
location / {
try_files $uri $uri/ /index.php;
fastcgi_index index.php;
fastcgi_pass php-fpm;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
- Then move it to /home/user-data/www/thanhnhua.vn.conf
- Run
/mailinabox/tools/web_update
- Run âsudo service nginx restartâ
Everything works well.
I got PHP to work in v61.1 but images wonât display. I get 403 errors for the images. I made sure user-data [1000]
is the owner of the files and folders.
I did have this working with v57 but I canât remember how I did it.
What do I need to do to get images to display in v61.1? Iâm only trying to edit the default landing page for my MIAB server by adding a little PHP and a couple of images.
UPDATE:
Adding a directory named âimagesâ and adding a location to the config file works:
location / {
try_files $uri $uri/ /index.php;
fastcgi_index index.php;
fastcgi_pass php-fpm;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
location /images/ {
}