nginx proxy_pass works on http but fails on https

When I pass http:localhost:9000 to proxy_pass then it is working. But When I pass https:localhost:9000 then it fails pid /var/run/nginx.pid; worker_processes 2; events { worker_connections 65536; use epoll; multi_accept on; } http { limit_req_zone $binary_remote_addr zone=basic_limit:10m rate=20r/s; limit_conn_zone $binary_remote_addr zone=limit_conn:1m; keepalive_timeout 65; keepalive_requests 100000; sendfile on; tcp_nopush on; tcp_nodelay on; client_body_buffer_size 128k; client_max_body_size 10m; client_header_buffer_size … Read more

Reverse proxy for 2 domain with same context path

I have 2 different domains my.domain1.com and my.domain2.com and both have context name /app1 and this should be routed to two different backend boxes. Problem here is my.domain1.com is running on VirtualHost _default_:443 and routing /app1 for internal01 server. Now i need to configure my.domain2.com to route /app1 requests to internal02 server. Is there option … Read more

nginx: Append to proxied URL with proxy_pass

I’m dealing with some legacy issues where I have to reconfigure servers hosting a PHP based application. One of the decisions was to move away from Apache onto Nginx. Now the application hosts two kinds of responses; /some/path -> HTML templates /api/some/path -> JSON The application is based on Laravel. Now, I have two virtual … Read more

proxypass ajp with apache and tomcat for multiple websites

I have Website running on Tomcat on port 8080 with ProxyPass enabled. Now I want to install WordPress on Apache say www.domain.com/blog. I tried various combinations in Apache but without any luck. I have following configuration in Apache which works fine for www.domain.com but for www.domain.com/blog what configurations I have to make so that www.domain.com … Read more

Use nginx as proxy to a sites.google.com site

I’m trying to create a proxy_pass to a sites.google.com site. It works.. kinda. The site appears somewhat different when I access it through the nginx proxy. My configuration: location /gtis { proxy_set_header HOST sites.google.com; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass https://sites.google.com/site/grupotisociedade/; proxy_redirect default; } What can be wrong? (broken) site through … Read more

nginx proxypass for video/audio from amazon cloud drive

I have a mp3 file on my amazon cloud drive: How can I make nginx proxy_pass to play this audio on chrome? I need to get content range header, then send the content-range header to proxy server. Configuration: location /match/here.mp3 { proxy_pass https://content-na.drive.amazonaws.com/cdproxy/templink/uIBwvxaYbNEQFB8gUjIgu6h9RjLdu18nKGxterGfh9MFfJttb; } And the link is: http://46.101.231.60/match/here.mp3 Simple when I enter this link … Read more

Client Denied By Server Configuration Appache Reverse Proxy

This is driving me stir crazy and I have researched across the Internet trying various answers none of which have worked. I am using Apache 2.2.9 for Windows and my httpd.conf is as follows: NameVirtualHost *:80 <VirtualHost *:80> ServerName MyLocalMachine.MyDomain.com DocumentRoot “C:/MyFolder/” <Directory “C:/MyFolder/SubDirectoryOne/SubDirectoryTwo”> Options -Indexes FollowSymLinks AllowOverride All Order allow,deny </Directory> ProxyPass /MyFolder/SubDirectoryOne/ http://ServerOne.MyDomain.com/MyFolder/SubDirectoryOne/ … Read more

Using Apache proxy pass not forwards with port

I have some websites on my server and few of them have proxy pass and they are passing some port to some subdomain. But now I’m trying to add another subdomain for Webmin, but it doesn’t forward to the port. This is site.conf: <VirtualHost *:80> ServerAdmin webmaster@site.tld ServerName webmin.site.tld ProxyPreserveHost On <Proxy *> Order allow,deny … Read more

How to use server_name in local environment in nginx with docker?

I get confused with the following situation: I know from my production webserver, that I use the server_name for my domain. E.g.: server { server_name example.com; … } But now I have a raspberry pi in my local network running nginx in Docker binded to port 80. The Pi has the hostname “fotobox”. From my … Read more