I'm using Ubuntu 16.04 with Plesk. After some time that everything has been okay, all the webpages from Plesk throw 502 bad gateway errors for no obvious reason. As soon as I type the command service apache2 restart, everything's alright again.
Oddly, it states
502 Bad Gateway
nginx
despite using Apache instead of nginx.
Related
I have app running on port - 3000 and running with caddy reverse proxy at port 80 and 443.
It works fine, but as soon as I switch to cloudflare, the site gets down and shows error 502 bad gateway
I just got this solved by installing tls.dns.cloudflare plugin.
I run a server which uses httpd and an AJP proxy to Tomcat.
I switched on mod_spdy on my server yesterday and I started seeing some 503 errors. I have read something that because of the number of parallels connections through mod_spdy it may cause an issue. Is this the case and how do you resolve this?
I am new to Amazon EC2.
I have 2 instances A and B in EC2. Both are Redhat 6.4.
They are part of the same VPC
A is assigned with an Elastic IP.
I setup an Apache httpd server on A to download files from.
I made sure to have an inbound rule on A for HTTP traffic(port 80). IPtables on A is stopped as well
I am trying to download a file from A on machine B.
Here is what i get:
[ec2-user#ip-172-31-21-183 tmp]$ wget http://ec2-1-2-3-4.us-west-2.compute.amazonaws.com/MySQL-5.6.15-1.el6.x86_64.rpm-bundle.tar
--2014-04-24 08:36:32-- http://ec2-1-2-3-4.us-west-2.compute.amazonaws.com/MySQL-5.6.15-1.el6.x86_64.rpm-bundle.tar
Resolving ec2-1-2-3-4.us-west-2.compute.amazonaws.com... 172.31.6.188
Connecting to ec2-1-2-3-4.us-west-2.compute.amazonaws.com|172.31.6.188|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2014-04-24 08:36:32 ERROR 403: Forbidden.
It seems i am missing something basic. What's is wrong in the above setup?
Thx in advance
Error 403 is an HTTP error - it means that B was able to successfully connect to A, but httpd returned an access error.
Check your httpd configuration - you may have configured it to require authentication for all requests, or the file itself may have file access permissions that do not allow httpd to access it.
I have spent 1 full day on this and I am tired. Any help will be appreciated
Problem:
Rails app. Working perfectly on development machine. Deployed it on production machine - Ubuntu 10.04, Apache2 /2.2.14, mysql, Using Passenger for Rails.
Whenever I tried to access with serverName in the browser, the url will become https:// serverName and the page will not be displayed.
I ended up enabling ssl and generating a certificate. The site works with a warning - "not trusted. do you want to proceed". I am fine with that.
But I am trying to run it on http and nto redirect to https.
I disabled ssl mode with sudo a2dismod ssl
removed default-ssl from sites-enabled
Now ssl is disabled but still when I go to browser and type the server address or ip, it appends https to it and says 'This webpage is not available'
It is not the browser issue because I am able to access the other server (not owned by me) with http.
Also the app runs fine with http on my localhost in the same browser.
I would really appreciate if anyone could help me with disabling https completly on apache2.
I found out why the redirect was happening.
Everything was working fine on local but not in the production environment, even after disabling SSL on apache. It was rails which was redirecting it on https.
Had to do this
config.force_ssl = false
in config/environments/production.rb
Background:
OS: ubuntu
Web Server: apache2
What works:
I can ping the server's elastic IP (and receive a response)
I can ssh into the server
What doesn't work:
I cannot get any sort of http response from the server
Expected Behavior:
When I go to http://ec2-XXX-XX-XXX-XXX.compute-1.amazonaws.com/, it will serve my page, or at least give me a 404 that I can debug
Actual Behavior:
When I go to http://ec2-XXX-XX-XXX-XXX.compute-1.amazonaws.com/, it says "Oops! Google Chrome could not connect to ec2-XXX-XX-XXX-XXX.compute-1.amazonaws.com". It doesn't even give me a 404.
Rant:
Clearly the server is there because I can ssh in to that exact address and I can ping that exact IP and get a response. But when I go that exact address in my web browser it's as if it never makes it to the server. Or it's as if Amazon isn't letting http requests through, but in my security group I am clearly specifying that http requests from all sources are allowed through. Apache is definitely running, my document root is definitely set up properly, and my error and access logs don't give me anything.
Is there any sort of log in between Amazon and the server, or in between requests making it to the server and being received by Apache that would specify why it's returning "not found" rather than a 404. Can I make my Apache logs more verbose?
Thanks in advance! I've spent hours on this....
Turns out apache was set to listen on port 8080 rather than port 80, so if you encounter this problem, try taking a look at what apache's listening to.