I need to configure an URL rewrite that way:
Server Application Provider: Tomcat 8 with a Java Web Based Application.
WebServer: IIS 10.0
Original URL application:
http://localhost:8080/Spigen
Desired URL:
http://localhost/Spigen/bi/sams
I tried that way:
1- In IIS 10 I set up a Server Farm with
Server Address= localhost
httpPort= 8080
2- Configured a Rule to remove 8080 port from URL:
Rule 1
3- Configured a Rule of user-friendly URL:
user friendly config
I didn't have desired effect. When I access:
http://localhost/Spigen/bi/sams
I receive from browser 404 messagem:
404 message
I don't really have idea how could I get that.
The idea is to have several URL acessing the same application and the application make decisions based on it.
URL Examples:
/Spigen/bi/sams
/Spigen/bi/app
/Spigen/bi/nok
What configuration is missing?
Related
I currently have an Heroku app that is being served over a CDN. I have just added Fastly to my Heroku app as an addon and I am struggling to configure it properly. Here is my current configuration:
I have my domain registered on GoDaddy with the following CNAME configuration:
Host: www
Points to: my-site-herokuapp-com.global.ssl.fastly.net
TTL: Custom
Seconds: 600
Here is the GoDaddy forwarding configuration (not sure if this matters):
Forward to https://www.my-site.io/
(301 & forward only)
Here is my fastly configuration:
Domains:
my-site-herokuapp-com.global.ssl.fastly.net
*Provisioned for my-site via Heroku*
my-site.herokuapp.com
*Provisioned for my-site via Heroku*
www.my-site.io
And finally in Heroku in the domains configuration section of my app here are my settings:
Domain Name: my-site.io
DNS target: darwinian-kumquat-123456.herokudns.com
Domain Name: www.my-site.io
DNS target: serene-trout-123456.herokudns.com
Before I tried to make this change I had the CNAME pointing directly to: serene-trout-123456.herokudns.com an it was working fine. However after updating this value to the new Fastly value: my-site-herokuapp-com.global.ssl.fastly.net Fastly directs the site to my-site.herokuapp.com instead of just https://www.my-site.io. I followed the instructions listed here so not entirely sure where I have gone wrong. Any ideas?
Probably because you used redirect 301 and you are using the same browser as before before cleaning cache and data.
301 redirects are recomended only for very limited cases: once done the browsers will NOT refresh again any data from the original server.
There are plenty of posts regarding redirection 301, for example:
Cannot remove 301 redirect
htaccess 301 redirect - how to disable it?
https://www.exai.com/blog/301-redirects
I set up an IIS server (IIS 8) and added URL Rewrite.
If I set:
Requested URL: "Matches the Pattern"
Using: "Regular Expressions"
Pattern: "(.*)"
No conditions
Action Type: "Redirect"
Redirect URL: "http://myloadbalancer_censored_name.elb.amazonaws.com/"
Redirect Type: "Temporary (307)"
This works the way I would expect.
When I type the url in my browser (something like "http://10.0.1.47") my browser's omnibar changes to the redirect URL (something like http://myloadbalancer_censored_name.elb.amazonaws.com/).
So far so good ...
But when I change the setting in URL Rewrite from redirect to rewrite, I get back:
HTTP Error 404.4 - Not Found
Requested URL
http://10.0.1.47:80/
Physical Path
C:\inetpub\wwwroot
I'm trying to set up a reverse proxy to pull web resources as if they came from a separate machine (to hide the internals of where my web app server actually lives).
EDIT:
In the IIS log I can see these 2 lines:
2016-04-06 15:59:34 10.0.1.11 GET / - 80 - 10.0.1.11 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 404 4 123 15
2016-04-06 16:01:07 10.0.1.11 GET / - 80 - 10.0.1.11 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 307 0 0 46
The first one is with rewrite. The second one is with redirect. This shows I am hitting the same IP, but it fails with rewrites for some reason.
Select the root level server in Internet Information Manager (IIS) and select Application Request Routing Cache.
Click “Server Proxy Settings …” on the right most pane.
Check “Enable Proxy”.
I have installed apache on centos and configured cpanel/whm.
I have a jsp project which is hosted on the server and also we need to maintain some php files for supporting helpdesk.
jsp project url is http:www.xyz.in:8090/jspproject/index.jsp
php files url is http:www.xyz.in/heldesk/index.html
helpdesk folder and jspproject are placed under public_html i.e. /home/account/publich_html.
The following task is required
When user types url either "http:www.xyz.in" or "http:www.xyz.in:8090" then jspproject should run (http:www.xyz.in/jspproject/index.jsp) and still url must be "http:www.xyz.in/jspproject"
When user types url as "http:www.xyz.in/helpdesk" then helpdesk (php files) should run (http:www.xyn.in/helpdesk/index.html) and url must be "http:www.xyn.in/helpdesk"
.htaccess is placed under /home/account/public_html/
Please advice me how to handle in .htaccess with rewrite rule.
I have configured Sonar webserver to have all of the requests to go through Microsoft IIS server.
It was confirmed to work fine with requests via http protocol.
However, once the https was enabled, after successful login, Sonar webapp is trying to redirect to non-https url, causing it to timeout. If I then go and change the url to go to https, it shows as authenticated and continues to work as normal.
The same issue happens when you trying to logout - instead of redirecting to https page, it goes out to http.
What needs to be done to make Sonar post-login action to use the same protocol via which the login page was requested originally?
sonar.properties has:
sonar.web.host: 127.0.0.1
sonar.web.port: 9000
sonar.web.context: /sonar
IIS plugin has:
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9443"/>
<VirtualHost Name="*:443"/>
<VirtualHost Name="*:9000"/>
</VirtualHostGroup>
<ServerGroup Name="sonar_group">
<Server Name="sonar_server">
<Transport Hostname="127.0.0.1" Port="9000" Protocol="http"/>
</Server>
</ServerGroup>
<UriGroup Name="sonar_host_URIs">
<Uri Name="/sonar*"/>
</UriGroup>
<Route ServerGroup="sonar_group" UriGroup="sonar_host_URIs" VirtualHostGroup="default_host"/>
Thanks.
In the web UI (while logged in as an admin user), go to Settings -> General and make sure the URL listed under Server Base URL starts with "https". This can also be set in the server's sonar.properties file using sonar.core.serverBaseURL
This is a well-known issue with the Ruby stack, and requires tweaking the web-server config -- not that of Sonar. On Apache you'd have to do the following, Im sure the pointers in the ticket will also lead you to a solution for IIS:
RequestHeader set X_FORWARDED_PROTO "https"
I'm using Passport-google to login users in example.com:3000. It works great. But if I put the Node.js server behind a proxy (IIS7; don't ask why, I had to), and access to my site in example.com (not in example.com:3000), I can't login with Passport-google. My RewriteRule in IIS:
Pattern (.*)
{HTTP_HOST} Matches myserver.com
{SERVER_PORT} Does not match 3000
Rewrite URL: http://127.0.0.1:3000/{R:1}
The error I got:
Cannot GET /accounts/o8/ud?
Also I have the same problem with Passport-twitter, and Passport-facebook.
I think I should set some other rule in IIS, or set some proxy settings in Passport.js, or OpenID, but haven't figured out yet. Any ideas?
The IIS proxy had a bad configuration. under Application Request Routing (ARR) / Server proxy settings Reverse rewrite host in response headers was switched on, so when passport sent a 302 with a location in header set to https://www.google.com/accounts/o8/... the IIS proxy replaced it to http://myserver.com/accounts/o8/... . which of course was an invalid link.