nginx 502 bad gateway

I get a 502 Bad Gateway with nginx when using spawn fcgi to spawn php5-cgi. I use this to span an instance on server start using the following line in rc.local /usr/bin/spawn-fcgi -a 127.0.0.1 -p...

How to ban all executable files on Apache

I would like to find out the most effective way to ban any executable files from one specific sub folder on my server. I allow file uploads by users into that folder, and would like to make that...

Trouble changing `upload_max_filesize` on nginx

I've see a few other similar questions on here, but most of the answers are Apache specific (dealing with their .htaccess file) and I'm using nginx. I'm having trouble making my change to the...

Fastcgi error - FastCgiIpcDir problems in error log

FastCgiIpcDir problems in error log Hi, I have noticed in my Apache error logs the following error (error 1): [Wed Feb 08 14:00:06 2012] [alert] [client 41.185.88.175] (2)No such file or ...

htaccess rule to parse php in html files not working

can't for the life of me work out why this isn't working - on a dreamhost server, I've created an htaccess file and added AddHandler php5-cgi .html .htm to allow php in html files, as per the...

Apache + Nginx reverse proxy not serving index.php by default

I have a bunch of sites that work great with nginx + php-fastcgi and I have no complaints there! The only thing that doesn't work is a PHP gallery application called Gallery3. Sadly, I have to use...

How to remove multiple UTF-8 BOM sequences

Using PHP5 (cgi) to output template files from the filesystem and having issues spitting out raw HTML. private function fetch($name) { $path = $this->j->config['template_path'] . $name ....

yii CDbException: CDbConnection failed to open the DB connection: could not find driver

I am trying to use the yii framework for a while. I have been referring - first-app-doc and yiic-doc. I have read all the posts related to mine on "stackoverflow" but couldn't get any luck...

Rewrite all requests to index.php with nginx

In my apache configuration I have the following simple rewrite rule which unless file exists will rewrite to index.php on the urls you never see the file extension (.php) how can I rewrite this...

Nginx reverse proxy for Apache - error 500 sometimes

I'm a newbie with nginx and I got a headeach with the server configuration. I configured Nginx as reverse proxy for Apache, all seem work ok but sometimes error 500 appears. The strange thing...

Find the correct php.ini file

I am currently trying to locate the correct php.ini file to edit it and restart Apache, so the changes will take place and I'm stumped. What I have done... I have found three different php.ini...

PDO installed but no dblib

[email protected]:/etc/apache2# dpkg -l |grep php5 ii libapache2-mod-php5 5.3.10-1ubuntu3.8 server-side, HTML-embedded scripting language (Apache 2 module) ii php5 ...

Nginx + phpFPM: PATH_INFO always empty

I configured nginx stable (1.4.4) + PHP (using FastCGI, php-fpm) on Debian. That works fine: location ~* ^/~(.+?)(/.*\.php)$ { fastcgi_split_path_info ^(.+?\.php)(/.*)$; alias...

No releases available for package

I'm trying to install some pear packages such as gnupg in a Ubuntu OS in virtualbox, but if i use sudo pecl install gnupg, it throws No releases available for package "pecl.php.net/gnupg" install...

webserver: php.ini changes not taking effect

According to phpinfo() the following php.ini files are loaded: Configuration File (php.ini) Path /etc/php5/cgi Loaded Configuration File /var/www/vhosts/mywebsite.com/etc/php.ini Scan this dir...

Ubuntu Nginx/Laravel 500 Internal Server Error

When I try to access say: Http://localhost/page I get a 500 Internal Server Error from nginx. 500 Internal Server Error nginx/1.1.19 is all it states on the page. In the log file I get this error:...

Nginx serves .php files as downloads, instead of executing them

I am installing a website in a droplet (Digital Ocean). I have a issue for install NGINX with PHP properly. I did a tutorial...

Composer installing: the json extension is missing

I wrote in Linux Terminal: curl -s https://getcomposer.org/installer | php It said: #!/usr/bin/env php Some settings on your machine make Composer unable to work properly. Make sure that you fix...

How to properly configure alias directive in nginx?

I have been trying to configure multiple webapp on my nginx webserver but I can't get working one Laravel app that requires $document_root set to laravel public folder. I am currently trying to...

can't parse PHP in .html docs, MAMP Pro

I need to parse PHP directives in files with an .html extension (I'm updating a legacy site and wish to avoid broken links). Lots of tips and solutions exist, none of which are working for me...

NginX not executing PHP

I've been through dozens of potential solutions to this problem but cannot find anything that works. Basically, PHP files are not executing on my NginX + PHP_fpm + Ubuntu 14 server. I have all the...

Serving PHP files as downloads, instead of executing them

I recently installed nginx and php 7.0.16 in my machine, but for some reason nginx downloads php files, rather than executing them. I've already spent couple of days and implemented all solutions...

Nginx/Certbot - invalid response from domain/.well-known

I'm trying to set up https on our web page which runs on Django 1.8. I'm very new in this area so I use Certbot. I followed the instructions until ./path/to/certbot-auto certonly. How would you...

Nginx unable to serve the node.js POST requests

I've a VM Ubuntu15.04 server and I've configured nginx to listen requests on port 80 and forward them to respective applications on different ports. I have a simple node.js service running over...

http to https redirection through htaccess: incorrect redirection error

I need all HTTP requests to redirect to HTTPS: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^some-domain\.com$ [NC] RewriteRule ^(.*)$ https://some-domain.com/$1...

.htaccess not working on my webserver (404 - not found) how to fix?

My .htaccess file: RewriteEngine on # Rewrite /foo/bar to /foo/bar.php RewriteRule ^([^.?]+)$ %{REQUEST_URI}.php [L] # NOTE! FOR APACHE ON WINDOWS: Add [NC] to RewriteCond like this: #...

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

I've just recently moved my websites from apache2 to Nginx as my new web server backend. got to love problems aha. HTML files in the web host director work prior to php files making there way main...

Nginx rewrite rules are not working as expected

I have a website https://dev.mywebsite.com/index.php?album=portraits which displays photo-albums dynamically based on a POST value. I want to rewrite this URL to...

Index PHP downloaded instead of executing it

I updated my server with php 7.4 however it created some issues my website couldn't be live again, the issue started after resinstalling httpd or installing httpd-devel not sure I have bitrix...

Hacked Wordpress .htaccess

I have a wordpress site that features a .htaccess and a file called postfs.php. But when I try to delete them, they are written again. I tried to delete all the files on the site, change...