Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Serve up 2 Sites, 1 is php

$
0
0
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

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>