HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   I need your help badly - ERROR 502 - Bad Gateway! (http://www.howtoforge.com/forums/showthread.php?t=62357)

jaypabs 24th June 2013 18:39

I need your help badly - ERROR 502 - Bad Gateway!
 
I manually change the /etc/passwd because the location of the files was scramble.

After editing it, all of my sites are still functioning.

One of my site is linking to the wrong directory. like
/var/www/mydomain.com is pointing to /var/www/clients/client1/web2/

when it should be:
/var/www/mydomain.com is pointing to /var/www/clients/client1/web3/

So I deleted the mydomain.com manually under /var/www and create a link again to point the mydomain.com to /var/www/clients/client1/web3/.

But after doing this, all of my sites cannot be access and it is throwing an error:

Quote:

ERROR 502 - Bad Gateway!
The following error occurred:

This server received an invalid response from an upstream server it accessed to fulfill the request.

If you get this message repeatedly please contact the webmaster.
Is anyone how can I restore my site back?

I need your help badly. This is urgent as my sites are all down..

Thank you in advance.

jaypabs 24th June 2013 19:06

Help please.

I cannot even access ISPConfig admin.

till 24th June 2013 19:09

First you should undo the link change and try to restart apache. Do you have a backup of the passwd file?

jaypabs 24th June 2013 19:13

Quote:

Originally Posted by till (Post 299036)
First you should undo the link change and try to restart apache. Do you have a backup of the passwd file?

I already created the symlink again. But still the same error. Yes, I have backup the passwd file.

BTW, I'm using nginx.

jaypabs 24th June 2013 19:28

Hi till,

I'm waiting for the next solution. I really mess my server. All of the sites are inaccessible now.

jaypabs 24th June 2013 20:48

I just rebooted the server and it works fine now.

However, I still wanted to change the correct directory of one of my website. Under Sites >> Websites the ID = 2 but in the actual directory it was /var/www/clients/client1/web1. It should be /var/www/clients/client1/web2 and not web1.

So what is the proper way of correcting this?

BTW, all the files is under web1 and web2 is empty. I want to transfer also all the files under web1 to web2 folder.

Do I need to delete the shell-user?
Can I remove the symlink again and create a new one with the correct directory? Like

mydomain.com -> /var/www/clients/client1/web1/
#rm mydomain.com
and
#ln -s /var/www/clients/client1/web2/ /var/www/mydomain.com

Can I do this? I'm afraid my site will not function again if I remove and add symlink again.


All times are GMT +2. The time now is 18:03.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.