Ghostcast Server Error 502
Contents |
have one accepted answer. Are you sure you want to replace the current answer with this one? Yes, I'm sure. Changed your mind? You previously marked this answer as accepted. Are you
Ghost Nginx 502 Bad Gateway
sure you want to unaccept it? Yes, I'm sure. Sign Up Log In ghost 502 bad gateway submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In 502 bad gateway nginx 1.4 6 ubuntu submit View All Results By: BlueHat Subscribe Subscribed Share 0 502 Bad Gateway after Ghost restart December 15, 2014 4.9k views I've recently been playing around with Ghost as a possible blogging platform and attempted to install a theme I found. I put the files into the ghost/content/themes folder and extracted the zip (that all went just fine). I then went to restart ghost as is suggested on the guide I was following and I'm now getting a 502 error from nginx. See http://elliotblackburn.com/ The only command I tried to restart with was sudo service ghost restart. I then found https://www.digitalocean.com/community/questions/502-bad-gateway-after-ghost-upgrade?comment=24356 and attempted to do the same but to nginx and it said it restarted just fine but I'm still getting a 502 error. Here is a copy of my /var/log/nginx/error.log - http://pastebin.com/TLNHP5VU 1 comment 0 wenzhishen December 20, 2015 Mine is same with yours. Have you finally found a way out? Log In to Comment Leave a Comment Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below. Log In to Comment 4 Answers 1 aguilar1181 December 16, 2014 Hi, By looking at your error.log it looks like you might have a looping problem and haven't configure your blog url. Open config.js in your root directory and enter your domain name instead of my-ghost-blog.com I would also restart nginx and ghost after that. Reply Log In to Comment 0 BlueHat December 16, 2014 Hi aguilar1181, thanks for your answer. But sadly I've already done that when I first set everything up. My production url is set to 'http://www.elliotblackburn.com'. Any other ideas would be much appreciated! 0 aguilar1181 December 16, 2014 I think I might have a solution. Try this to restart ghost npm start --production People have complaint that using this code to restart
PKI Service Identity Access Manager Shop Online Cyber Security Services Managed Security Services DeepSight Intelligence Incident Response Security Simulation Website Security SSL Certificates Complete Website Security Code Signing Certificates Norton Shopping Guarantee Buy SSL Products A-Z Services Services Home Business Critical Services Consulting Services Customer Success Services Cyber Security Services Education Services Solutions Solutions Home Topics Encryption Everywhere Internet of Things Next Generation Endpoint Office 365 Industries Automotive Cyber Insurance Education Financial Services Global Service Providers Industrial Control https://www.digitalocean.com/community/questions/502-bad-gateway-after-ghost-restart Systems Healthcare Retail Government Federal Government State & Local Support Center Technical Support Symantec Connect Buying Programs Upgrades Maintenance & Renewals Training Security Center Security Center Home Blogs ISTR Threats Virus Definitions and Security Updates Removal Tools Partner Find a Partner Become a Partner Login Required Login into Partner Portal Partner Licensing Partner Renewals https://support.symantec.com/content/unifiedweb/en_US/article.TECH110757.html Partner Training Margin Builder Opportunity Registration Financial Benefits English 中文(简体) 中文(繁體) Česká English Français Deutsch Magyar Italiano 日本語 한국어 Polski Português Pусский Español Site: Symantec Enterprise Small Business Norton United States Search Support Home Support Home MySymantec Licensing Products A-Z SYM16-015 Security Advisory Login Profile Subscriptions Logout Login Forgot Password? Don't have a SymAccount? Create a SymAccount now!' There is no article that matches your request Support / Didn't find the article you were looking for? Try these resources. Supported Products A-Z Get support for your product, with downloads, knowledge base articles, documentation, and more. Education Services Maximize your product competency and validate technical knowledge to gain the most benefit from your IT investments. Submit a Threat Submit a suspected infected fileto Symantec. Submit a False Positive Report a suspected erroneous detection (false positive). MySymantec Create and manage cases, manage licensing and renewals, submit threats, and enroll with Symantec Rewards. Contact Us Customer and Technical Support phone nu
more like 7am to 5:30pm but close enough. I am also a father and husband with responsibilities. So when my sight goes down I don't have the time needed to really dive in and fix the problem. And that's what recently happened to http://yojimbosecurity.ninja/ghost-and-the-502-error/ me. It took me three days or about 5 hours in total to fix this problem. And http://joewoodward.me/fixing-502-errors-after-ghost-upgrade-on-digital-ocean/ a lot of that time spend needlessly reading code and searching the web. If you find your self in a similar situation take a deep breath and relax you'll be back up and running in no time. The Machine My blog is run Ghost on Ubuntu. It is a stalk Digital Ocean droplet that I manage. I did what most sysadmins do and set up fail2ban and other tasks. I wrote 502 bad scripts for backups(well I set up cron jobs) and I created my user account. I read the Ghost wiki and the tutorial on Digital Ocean. I then proceed to set up my new blog. I edited the config files, got a domain name, and set up DNS. All was good in the world. You would type in my domain name and it would take you to my blog. I then began to blog, I wrote enough blog posts to want to take a snap shot. After all that is 502 bad gateway part of the reason I chose Digital Ocean. And That's where the trouble began. D'HO! After I took a snap shot and my machine rebooted I went to write another blog post and was meet with a 502 Bad Gateway. What? It was just working! All I did was take a snap shot! How the hell could that have broke my machine? I was up set to say the least. Not just that I had asked someone that I look up to to check out my sight. And now I have this 502 bad gateway, what's that? 502 Bad Gateway In my search for an answer I found that this 502 error was not very common. Also it seamed to be specific to Ubuntu/nginx. That was fine with me because that's what I am using. I did not find much on Ghost and the 502 error and that bothered me. I never messed with nginx or the Ubuntu configs just Ghost's configs, in other words I knew it was a Ghost problem. what is the 502 Error The 502 bad gateway error is when one machine requests something invalid from another machine. Well what does this mean to me? How is this suppose to help? My error says something about a bad proxy but I'm not using a proxy, right? I needed to know more I need to know how everything worked together to find the problem. I just knew it was a Ghost config problem. However all the information I could find was on Ubuntu and Nginx. I needed to know how all
ghost with the help of Digital Ocean's tutorial. Upgrading Ghost (updated as of Ghost 0.4) First you'll need to find out the URL of the latest Ghost version. It should be something like http://ghost.org/zip/ghost-latest.zip. Once you've got the URL for the latest version, in your Droplet console type cd /var/www/ to change directory to where the Ghost codebase lives. Next, type wget http://ghost.org/zip/ghost-latest.zip Remove the old core directory by typing rm -rf ghost/core Unzip the archive with unzip -uo ghost-latest.zip -d ghost Make sure all of the files have the right permissions with chown -R ghost:ghost ghost/* Change into your Ghost directory with cd ghost, then run npm install --production to get any new dependencies Finally, restart Ghost so that the changes take effect using service ghost restart From the terminal this seemed to work as expected; however, when I tried to access the site via the browser I was served with a 502 Error from nginx. First things first, check your error logs for nginx. Open to /var/log/nginx/error.log and scroll to the bottom of the file, you should one or more errors. Likely causes When you updated and ran npm install --production something failed You forgot to update your nginx configuration to point to the blog You updated the nginx configuration but not the ghost configuration for your domain name settings Fixes First thing to check is that your dependencies have installed correctly during the update. open the console and cd /var/www/ghost run npm start --production watch for dependency errors You will probably see something like run 'npm install sqlite3 --save' and an error stating that npm couldn't find one or more dependencies. Run the commands as instructed and then try and start npm again, rinse and repeat until you've cleared the dependency errors. Next check that your nginx configurations are correct. Open /etc/nginx/sites-enabled/ghost and /etc/nginx/sites-available/ghost and check that your server_name is correct. The server_name config will be inside the server block. server { server_name joewoodward.me; } Last you need to validate your ghost url configuration. Open /var/www/ghost/config.js and look for the production config block. Inside the production block you will see the url attribute, this should match your domain name. e.g. production: { url: 'http://joewoodward.me' } Once you've validated all of your configs you can restart ghost by running service ghost re