Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Yesterday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
May 30, 2026
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Nginx server configuration problem
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="pasansnoop" data-source="post: 28035153" data-attributes="member: 125460"><p>machan is there anybody who knows how to configure nginx to use php on a server?</p><p>after doing everything, I get '502 Bad Gateway' error from the server <img src="/styles/default/xenforo/smilies/default/oo.gif" class="smilie" loading="lazy" alt=":oo:" title="Oo :oo:" data-shortname=":oo:" /> </p><p>i'm stuck for a day troubleshooting the error but couldn't find any..</p><p></p><p>this is the guide I followed> <a href="https://www.techsupportpk.com/2019/04/how-to-set-up-lemp-stack-ubuntu-1904.html" target="_blank">https://www.techsupportpk.com/2019/04/how-to-set-up-lemp-stack-ubuntu-1904.html</a></p><p></p><p>can you spot any fault in this config? (which I've linked to /etc/nginx/sites-enabled/)</p><p></p><p>[CODE=nginx]server {</p><p> listen 80;</p><p> root /var/www/html;</p><p> index index.php index.html index.htm index.nginx-debian.html;</p><p> server_name localhost;</p><p></p><p> location / {</p><p> try_files $uri $uri/ =404;</p><p> }</p><p></p><p> location ~ \.php$ {</p><p> include snippets/fastcgi-php.conf;</p><p> fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;</p><p> }</p><p></p><p> location ~ /\.ht {</p><p> deny all;</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="pasansnoop, post: 28035153, member: 125460"] machan is there anybody who knows how to configure nginx to use php on a server? after doing everything, I get '502 Bad Gateway' error from the server :oo: i'm stuck for a day troubleshooting the error but couldn't find any.. this is the guide I followed> [URL]https://www.techsupportpk.com/2019/04/how-to-set-up-lemp-stack-ubuntu-1904.html[/URL] can you spot any fault in this config? (which I've linked to /etc/nginx/sites-enabled/) [CODE=nginx]server { listen 80; root /var/www/html; index index.php index.html index.htm index.nginx-debian.html; server_name localhost; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; } location ~ /\.ht { deny all; } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Awruddata maasa keeyada?
Post reply
Top
Bottom