Hi everybody! I will try to explain the problem...
I have a server running under scheme:
[USER] < NGINX [PROXY / PORT:443] < NGINX [PHP-FPM / PORT:8081]
All scripts are working fine. But ELGG constantly adds port 8081. Ex, I install ELGG:
https://example.org:8081/vendor/elgg/elgg/install/css/install.css https://
example.org:8081/vendor/bower-asset/jquery/dist/jquery.min.js https://
example.org:8081/vendor/elgg/elgg/install/js/install.js https://
example.org:8081/vendor/elgg/elgg/_graphics/elgg_logo.png https://
example.org:8081/vendor/elgg/elgg/_graphics/favicon.ico
NGINX [PHP-FPM]:
server {
# -------------------------------------------------------------------------- #
# Variables.
# -------------------------------------------------------------------------- #
set $srvUser "web_example_org";
set $srvDomain "example.org";
# -------------------------------------------------------------------------- #
# Server name & IP.
# -------------------------------------------------------------------------- #
listen 8081 ssl http2;
server_name example.org;
# -------------------------------------------------------------------------- #
# Logs.
# -------------------------------------------------------------------------- #
error_log "/home/project/web_cbrspc04/.logs/nginx.error.example.org.log";
access_log "/home/project/web_cbrspc04/.logs/nginx.access.example.org.log" main;
# -------------------------------------------------------------------------- #
# Root & index.
# -------------------------------------------------------------------------- #
root "/home/project/web_cbrspc04/domain/public_html";
index index.html index.htm index.php;
# -------------------------------------------------------------------------- #
# SSL.
# -------------------------------------------------------------------------- #
ssl on;
ssl_certificate "/home/project/example.org/example.org.crt";
ssl_certificate_key "/home/global/server.crt.key";
# -------------------------------------------------------------------------- #
# Location.
# -------------------------------------------------------------------------- #
location / {
try_files $uri $uri/ @elgg;
}
location = /rewrite.php {
rewrite ^(.*)$ /install.php;
}
location ~ \.php$ {
try_files $uri @elgg;
fastcgi_pass "unix:/run/php-fpm/$srvDomain.sock";
fastcgi_index "index.php";
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include "/etc/nginx/fastcgi_params";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location @elgg {
fastcgi_pass "unix:/run/php-fpm/$srvDomain.sock";
include "/etc/nginx/fastcgi_params";
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param QUERY_STRING __elgg_uri=$uri&$args;
}
}
NGINX [PROXY]:
server {
# -------------------------------------------------------------------------- #
# Server name & IP.
# -------------------------------------------------------------------------- #
listen 443 ssl http2;
server_name example.org;
# -------------------------------------------------------------------------- #
# Logs.
# -------------------------------------------------------------------------- #
access_log off;
# -------------------------------------------------------------------------- #
# SSL.
# -------------------------------------------------------------------------- #
ssl on;
ssl_certificate "/home/project/example.org/example.org.crt";
ssl_certificate_key "/home/global/server.crt.key";
# -------------------------------------------------------------------------- #
# Location.
# -------------------------------------------------------------------------- #
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_pass https://127.0.0.1:8081/;
}
}
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
- Kitsune Solar@KitsuneSolar

Kitsune Solar - 0 likes
You must log in to post replies.I have a few weeks to solve problem. I can not fix. :(
Are you use ISP manager?
Try this also:
No, only console. :)
Я попробую чуть позже, спасибо. Но выглядит как жутчайший костыль :)
This hook for known ISP manager's bug only :/
Apparently, not only. I have a clean server with separately installed nginx + php + mariadb.
I do not like the control panels.
In first test, error comes only when you install ELGG. When ELGG installed and working, the port is not added.