Skip to main content

All Questions

Tagged with
0 votes
0 answers
13 views

How can I set up Nginx on Ubuntu 20.04 to run PHP?

I'm trying to set up Nginx on Ubuntu 20.04 on Profiserver, so it's able to serve files with PHP contents. However following many tutorials still doesn't bring me the answer as index.php file is served,...
Mixtuur's user avatar
1 vote
1 answer
67 views

ISPconfig/Nginx/wordpress to nginx proxy manager | wordpress using permalinks/postname

I am migrating my wordpress site from Ispconfig/Apache to Ispconfig/Nginx and introducing Nginx proxy manager in the mix. The problem seems to be the following: htaccess is not enabled in nginx are ...
Arch's user avatar
  • 11
0 votes
0 answers
36 views

Is there a way to prevent direct copy of URL with X-Accel?

I am currently serving private images using X-Accel. The images folder is behind the root, and I have the following block inside the nginx config: location /private_files { internal; root /var/...
Stackerito's user avatar
0 votes
1 answer
14 views

X-Accel return 404 but path and config seem to be correct

I have the following block in my nginx config: location /files { internal; root /var/www/website/storage/uploads; } In my Laravel app I am trying to redirect get-file URI to the private ...
Stackerito's user avatar
0 votes
1 answer
133 views

php-fpm and nginx security isolation not working....or may be my understanding is not correct

I followed the following tutorial to do isolation of my two websites. https://www.vultr.com/docs/use-php-fpm-pools-to-secure-multiple-web-sites/ Here is what I did: Created two users and then ...
Frank Martin's user avatar
0 votes
1 answer
256 views

How to serve html and php from multiple folders under the same host in nginx?

I want to serve two folders with nginx: a folder with generated html files, and a folder with static html and php scripts, take this folder structure as an example: ├─/var/www │ ├─generated │ │ ├─...
Gergő Gutyina's user avatar
0 votes
0 answers
103 views

nginx rewrite overlapped with Swagger body

Here's my nginx.conf: server { charset utf-8; client_max_body_size 512M; listen 80; listen 443 ssl http2 default_server; server_name app; set $base_root /app; root $...
Toqa Abbas's user avatar
0 votes
0 answers
66 views

Add new folder to yii2 with nginx

I got yii2 advanced template , but need to change the structure as below : app --backend --common --v1 --config --main.php --controller --SiteController.php --web --index.php ...
Toqa Abbas's user avatar
0 votes
1 answer
659 views

WSL2 is not handling file permissions properly, unable to write files from PHP

I am running nginx, mariadb and php8.2-fpm on my WSL2 Ubuntu server successfully, all running as user www-data just fine, however, I cannot upload files from the web interface. When I attempt to, the ...
Kevin Flanagan's user avatar
1 vote
1 answer
2k views

How to remove trailing slash before URL parameters in Nginx

I have an simple Nginx site that runs a single PHP file regardless of the URL (except for CSS/JS files, which are served normally) However, no matter what I do, and testing with multiple browsers, any ...
kmecpp's user avatar
  • 111
1 vote
0 answers
269 views

How to properly redirect HTTPS to local HTTP connected via WireGuard tunnel when the app itself is not using SSL?

I have an domain that is setup with an SSL certificate via Let's Encrypt so it only works via https://example.com/ This domain is connected via WireGuard tunnel to my home PC which serves a Laravel ...
Stackerito's user avatar
0 votes
0 answers
765 views

How to avoid permissions issues when using PHP to create folders and store files?

I have a Laravel project and part of the code creates folders and stores photos inside it. Each user has his own folder, but if he did not upload anything yet then this folder does not exist. Then the ...
Stackerito's user avatar
0 votes
1 answer
718 views

PHP pages stopped working on Nginx with reverse proxy for Apache

I set up a Nginx server with reverse proxy for Apache (following this tutorial) some months ago. Everything work great, the nginx part as well as the php pages on Apache. But I needed to use curl for ...
jost21's user avatar
  • 787
0 votes
1 answer
15k views

bad gateway 502: connect() to unix:/var/run/php/php8.1-fpm.sock failed in error.log

I installed php8.1 on ubuntu 18.04 but getting problems. I am getting 502 Bad Gateway error. The error.log is giving following error: 2022/06/30 17:48:38 [crit] 2224#2224: *1 connect() to unix:/var/...
user2994783's user avatar
1 vote
1 answer
8k views

502 Bad Gateway error: How to install php8.1-fpm.sock on ubuntu 18.04

I have nginx running on my system and php8.1 installed. But I am getting Bad Gateway problem. I found that I don’t have php8.1-fpm.sock installed on my system: $ php -ver PHP 8.1.7 (cli) (built: Jun ...
user2994783's user avatar

15 30 50 per page
1
2 3 4 5
7