Welcome! Log In Create A New Profile

Advanced

Serve up 2 Sites, 1 is php

Posted by stonkers 
Serve up 2 Sites, 1 is php
November 01, 2019 01:36PM
OK, so I'm trying to follow this page to serve up 2 sites on RHEL 7.5:

https://www.if-not-true-then-false.com/2011/install-nginx-php-fpm-on-fedora-centos-red-hat-rhel/

I've gotten pretty far, but can't seem to get the location directives right. The PHP site is by mediawiki, but for now just trying to get a phpinfo page to pop. Root of the site is going to a rundeck site which works fine as it is now. Here are my location attributes:

location /wiki {
alias /var/www/wiki/html;
index index.html index.htm index.php;
}

location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:8080;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location / {
proxy_pass http://localhost:4440;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Seems like I'm not tying the /wiki site to the php directive, but I tried various things to do that and most of them I couldn't even get nginx to start with. Any help would be amazing!

Thanks,
Eric
Re: Serve up 2 Sites, 1 is php
November 04, 2019 11:09AM
Any trouble shooting advise even?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready