I've a question.
How can I config my nginx for redirecting from url started without hashtags to url started with hashtag. For example "/sign-in" redirect to "/#sign-in". Or "/admin/create" to "/#admin/create".
But I need exclude some addresses, for example, "/api" redirect to "http://someapi.com".
I use windows. Thanks!
Related
I own an app in the Google Playstore.
This is accessible under the following url:
https://play.google.com/store/apps/details?id=#APPID#
#APPID# was used as a cover code.
Now I wanted to redirect the default url to the playstore URL with my Nginx proxy manager.
Means: example.org => https://play.google.com/store/apps/details?id=#APPID#
I have now tried many settings.
Correct me if I am wrong but I have applied the following configuration:
Domain Names: (example.org)
Scheme: auto
Forward Domain: https://play.google.com/store/apps/details?id=#APPID#
HTTP Code: 308
Perserve Path: Yes
Block COmmon Exploits: Yes.
And I add a SSL Certificate to my example.org
Force SSL: Yes
Everything else: No
it once (almost) worked and redirected me to https://play.google.com/store/apps/details?id=#APPID# /
(notice the / ) which is not recognized as url
Thanks in advance
i have a Application (Openproject) on a Webserver.
this is Reachable under http://10.0.0.1:8000/
Behind my users and the Webserver is a NGinx on which i need to publish under a specific URL: https://ngrp.com/openproject
so i made the following changes in my Nginx Configuaion (in this NGINX instance multiple Websites are published with the "location" settings):
location /openproject/ {
proxy_pass http://10.0.0.1:8000/;
include /etc/nginx/conf.d/proxy.conf;
}
But when i open the page through the Reverseproxy, the Webbrowser displays only a White Page.
In the Webbrowser Debugger i see, that some paths are wrong, so the browser couldnĀ“t load it. Example:
https://ngrp.com/assets/frontend/styles.c3a5e7705d6c5db9cfc1.css
(/openproject/ is missing in the URL)
Correct would be:
https://ngrp.com/openproject/assets/frontend/styles.c3a5e7705d6c5db9cfc1.css
So can somebody please tell me, which configuration is needed, so i can Openproject under the URL https://ngrp.com/openproject/ successfully?
Thank you very much.
When you proxy_pass you proxy the entire HTTP request meaning that you are actually requesting GET /openproject on http://10.0.0.1:8000/ rather than just GET /
You can add this line before the proxy_pass to fix this and remove the /openproject prefix :
rewrite /openproject/(.*) /$1 break;
This changes the requested URL from /openproject/... to /...
an nginx 1.14.0 site configuration has a number of domains pointing to a rails application.
server_name testing1.site.com testing2.site.com www.site.com testing1.site2.com testing2.site2.com www.site2.com;
Each of these domains is serving up properly, and have an associated certificate.
Adding these server names (on a single line)
server_name testing1.site.com testing2.site.com www.site.com testing1.site2.com testing2.site2.com www.site2.com
iwantthis.com www.iwantthis.com;
then
sudo nginx -t
runs properly and
sudo service nginx restart
without hiccups. Then, extending the certificate to the 2 new domains (via letsencrypt) passes the test of having the domain specified in a server block. Pinging the domains confirms the local DNS server is synched up.
Yet browser calls return a 404 error (the version of nginx shown is correct).
What is a possible source of this non routing and how can one test nginx's response for a specific domain request?
Im on NGINX
I have wordpress installed on:
/home/kusanagi/wordpress1/DocumentRoot/
&
/home/kusanagi/wordpress2/DocumentRoot
My IP points to wordpress1/DocumentRoot, but id like http://IP/wordpress2 to point to /home/kusanagi/wordpress2/DocumentRoot.
So far ive tried adding to /etc/nginx/conf.d/_http.conf:
location ~ /wordpress2 {
root /home/kusanagi/wordpress2/DocumentRoot/;
}
but i get a 502/404 or nothing. Any help would be appreciated.
point your ip by default to "/home/kusanagi" this path and restart your apache.
then you can access both url by using
http://ip/wordpress1
http://ip/wordpress2
I have a basic bitnami wordpress installation. I followed their guide and setup https and automatic http to https redirection.
However when I tried to load external scripts I get the following error:
Failed to load https://external-script.com/: The 'Access-Control-Allow-Origin'
header has a value 'http://my-site.io' that is not equal to the supplied origin.
Origin 'https://my-site.io' is therefore not allowed access.
Which file should I edit and what should I add?
Thanks
Bitnami Engineer here.
You need to enable CORS in WordPress. To achieve that, you will need to set this line in the installdir/apps/wordpress/conf/httpd-app.conf file
...
<Directory /opt/bitnami/apps/wordpress/htdocs/>
...
Header set Access-Control-Allow-Origin "*"
...
</Directory>
After that, you will need to restart the Apache server to load this configuration.
installdir/ctlscript.sh restart apache
You will also find different ways to enable CORS by following our documentation guide.
Regards,
Jota