Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

My website is offline

I have my social platfrom running on apache2, but my website went offline after i reset root password & server is installed on another different account made instead of root. Do you know maybe a command how to fix it? Website get ERROR: 502 bad gateway

1 Answer

Luc de Brouwer
seal-mask
.a{fill-rule:evenodd;}techdegree
Luc de Brouwer
Full Stack JavaScript Techdegree Student 17,939 Points

Apache is permissions based, so my guess is that your custom made account has no privilege to access those files because of restricted permissions. Often the of times setting the permissions for new user accounts will help resolve problems like this in the future.

Try with:

sudo chown -R [USER NAME]:[USER NAME] /var/www Replace [USER NAME] with appropriate.

Also I would suggest double checking the Virtual Host files and your ip-settings in ifconfig.

But user have already an memeber of Sudo, or i am not getting it