configuring subdirectory in a wordpress installation for proxy pass to docker applicationHow to make nginx reverse proxy let 503 error pages pass through to client?Blank Page: wordpress on nginx+php-fpmNginx proxy pass works for https but not httpnginx load balancer rewrite to listen portnginx proxy redirecting request to different proxyNginx subversion commit failureNginx/Apache: set HSTS only if X-Forwarded-Proto is httpsnginx rewrite throw 404 with last and breakCodeIgniter nginx rewrite rules for i8ln URL'sNginx reverse proxy to many local servers + webserver duty
Determine direction of mass transfer
Complications of displaced core material?
'Select @VAR =' and 'Set @VAR =' behaving unexpectedly
Would cybernetic implants allow humans to use biofeedback to boost their performance to superhuman levels? If so how far could we take it?
Are there guidelines for finding good names for LaTeX 2e packages and control sequences defined in these packages?
Maximum interval between Alto & Tenor, & intervals when writing for SATB
Split into three!
Status of proof by contradiction and excluded middle throughout the history of mathematics?
Did significant numbers of Japanese officers escape prosecution during the Tokyo Trials?
Is it normal to "extract a paper" from a master thesis?
Unary Enumeration
Handling decimals in somewhat complex math
Comparison of bool data types in C++
What did the 'turbo' button actually do?
How to deceive the MC
(For training purposes) Are there any openings with rook pawns that are more effective than others (and if so, what are they)?
If I arrive in the UK, and then head to mainland Europe, does my Schengen visa 90 day limit start when I arrived in the UK, or mainland Europe?
Knight's Tour on a 7x7 Board starting from D5
What happened to the Dothraki in S08E06?
Why did it take so long for Germany to allow electric scooters / e-rollers on the roads?
Could a rotating ring space station have a bolo-like extension?
Are there historical examples of audiences drawn to a work that was "so bad it's good"?
Why does Bran want to find Drogon?
Are cells guaranteed to get at least one mitochondrion when they divide?
configuring subdirectory in a wordpress installation for proxy pass to docker application
How to make nginx reverse proxy let 503 error pages pass through to client?Blank Page: wordpress on nginx+php-fpmNginx proxy pass works for https but not httpnginx load balancer rewrite to listen portnginx proxy redirecting request to different proxyNginx subversion commit failureNginx/Apache: set HSTS only if X-Forwarded-Proto is httpsnginx rewrite throw 404 with last and breakCodeIgniter nginx rewrite rules for i8ln URL'sNginx reverse proxy to many local servers + webserver duty
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a wordpress installation using Nginx as the web server, now there is a need of adding moodle as the LMS to the same site, as a subdirectory, for example; www.mysite.com is where the wordpress site works then moodle would be www.mysite.com/learn.
This moodle runs in the same machine in a docker container which uses the bitnami moodle image; port 8081 is mapped to port 80 of the docker container i.e.
docker run -d -p 8081:80 -p 4443:443 --name moodle
I added a location block before wordpress configuration to the nginx config
location /learn
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081;
the php configuration for wordpress is as follows
# Pass the PHP scripts to FastCGI server (locally with unix: param to avoid network overhead)
location ~ .php$
# Prevent Zero-day exploit
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV production;
include fastcgi_params;
However this still gives a 404 response when I access www.amysite.com/learn
I checked the docker proxy is running bound to all IP addresses
/usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8081 -container-ip 172.19.0.3 -container-port 80
also a wget to localhost:8081 gives the moodle installation home page so I'm led to belive it is definitely a problem with my location block; or it is the Zero Day exploit config try_files $uri =404; causing the issue, even if so, I still can't remove that line.
Update
This configuration worked
location ~ ^/apply/(.*)$
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081/$1;
I can reach Moodle home page but all further URLs break because Moodle is not aware of generating links with the /learn context root; think I'll have to reconfigure Moodle to generate /learn context URLS
nginx php reverse-proxy docker
add a comment |
I have a wordpress installation using Nginx as the web server, now there is a need of adding moodle as the LMS to the same site, as a subdirectory, for example; www.mysite.com is where the wordpress site works then moodle would be www.mysite.com/learn.
This moodle runs in the same machine in a docker container which uses the bitnami moodle image; port 8081 is mapped to port 80 of the docker container i.e.
docker run -d -p 8081:80 -p 4443:443 --name moodle
I added a location block before wordpress configuration to the nginx config
location /learn
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081;
the php configuration for wordpress is as follows
# Pass the PHP scripts to FastCGI server (locally with unix: param to avoid network overhead)
location ~ .php$
# Prevent Zero-day exploit
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV production;
include fastcgi_params;
However this still gives a 404 response when I access www.amysite.com/learn
I checked the docker proxy is running bound to all IP addresses
/usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8081 -container-ip 172.19.0.3 -container-port 80
also a wget to localhost:8081 gives the moodle installation home page so I'm led to belive it is definitely a problem with my location block; or it is the Zero Day exploit config try_files $uri =404; causing the issue, even if so, I still can't remove that line.
Update
This configuration worked
location ~ ^/apply/(.*)$
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081/$1;
I can reach Moodle home page but all further URLs break because Moodle is not aware of generating links with the /learn context root; think I'll have to reconfigure Moodle to generate /learn context URLS
nginx php reverse-proxy docker
add a comment |
I have a wordpress installation using Nginx as the web server, now there is a need of adding moodle as the LMS to the same site, as a subdirectory, for example; www.mysite.com is where the wordpress site works then moodle would be www.mysite.com/learn.
This moodle runs in the same machine in a docker container which uses the bitnami moodle image; port 8081 is mapped to port 80 of the docker container i.e.
docker run -d -p 8081:80 -p 4443:443 --name moodle
I added a location block before wordpress configuration to the nginx config
location /learn
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081;
the php configuration for wordpress is as follows
# Pass the PHP scripts to FastCGI server (locally with unix: param to avoid network overhead)
location ~ .php$
# Prevent Zero-day exploit
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV production;
include fastcgi_params;
However this still gives a 404 response when I access www.amysite.com/learn
I checked the docker proxy is running bound to all IP addresses
/usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8081 -container-ip 172.19.0.3 -container-port 80
also a wget to localhost:8081 gives the moodle installation home page so I'm led to belive it is definitely a problem with my location block; or it is the Zero Day exploit config try_files $uri =404; causing the issue, even if so, I still can't remove that line.
Update
This configuration worked
location ~ ^/apply/(.*)$
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081/$1;
I can reach Moodle home page but all further URLs break because Moodle is not aware of generating links with the /learn context root; think I'll have to reconfigure Moodle to generate /learn context URLS
nginx php reverse-proxy docker
I have a wordpress installation using Nginx as the web server, now there is a need of adding moodle as the LMS to the same site, as a subdirectory, for example; www.mysite.com is where the wordpress site works then moodle would be www.mysite.com/learn.
This moodle runs in the same machine in a docker container which uses the bitnami moodle image; port 8081 is mapped to port 80 of the docker container i.e.
docker run -d -p 8081:80 -p 4443:443 --name moodle
I added a location block before wordpress configuration to the nginx config
location /learn
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081;
the php configuration for wordpress is as follows
# Pass the PHP scripts to FastCGI server (locally with unix: param to avoid network overhead)
location ~ .php$
# Prevent Zero-day exploit
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV production;
include fastcgi_params;
However this still gives a 404 response when I access www.amysite.com/learn
I checked the docker proxy is running bound to all IP addresses
/usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8081 -container-ip 172.19.0.3 -container-port 80
also a wget to localhost:8081 gives the moodle installation home page so I'm led to belive it is definitely a problem with my location block; or it is the Zero Day exploit config try_files $uri =404; causing the issue, even if so, I still can't remove that line.
Update
This configuration worked
location ~ ^/apply/(.*)$
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 X-Forwarded-Host $server_name;
proxy_pass http://0.0.0.0:8081/$1;
I can reach Moodle home page but all further URLs break because Moodle is not aware of generating links with the /learn context root; think I'll have to reconfigure Moodle to generate /learn context URLS
nginx php reverse-proxy docker
nginx php reverse-proxy docker
edited May 10 at 3:52
Anadi Misra
asked May 9 at 3:47
Anadi MisraAnadi Misra
3281719
3281719
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f966488%2fconfiguring-subdirectory-in-a-wordpress-installation-for-proxy-pass-to-docker-ap%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f966488%2fconfiguring-subdirectory-in-a-wordpress-installation-for-proxy-pass-to-docker-ap%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown