lets play. why is my web server not working

back story: my website stopped working when my vps host rebooted my server. this happened like 2 months ago but all i did about it was make a snarky toot. its still not working of course. because i didnt actually do anything to fix it it. kinda annoying that my toot did nothing. anyway im gonna try to fix it now

part 1: testing the server

curl jjsk.ws

curl: (7) Failed to connect to jjsk.ws port 80: Connection refused

ok we're really getting somewhere. docs about to make a diagnosis

part 2: finding the log files

i dont know where any of the log files are in linux. every time i have to look them up. today im not even having much success doing that

first i tried to read the apache access.log, and then i couldn't find it, and then i realised that apache probably isn't starting up so i need to read the "startup log" to see if the service failed to start for some reason, except i dont know where that is. syslog is just full of useless garbage

mastodon.social/media/6dQyo3X_

part 3: i dont think i actually need log files

so im assuming the problem is that the apache2 service isnt running. i dont know how to check, and i dont want to type anything into google to find out how to check, but i DO remember the Magic Incantation:

sudo service apache2 start

which i typed, and i hit return, and it says that the service failed to start. so from that, and the fact i cant connect to my web server, well! my dear fucking watson, we can deduce that it wasnt running. probably

part 4: what does the message tell me to do

the message that the service service told me is to "see 'systemctl status apache2.service' and 'journalctl -xn' for details" so im going to type those in because it beats typing anything else into stack overflow & reading any more incorrect garbage!! ill keep u posted

part 5: what does this mean

so well. it says that the service for the web server was "loaded" and also it has a "drop-in" (whatever that is) and also theres a lil kinda ANSI line and it says "forking.conf" so i assume that's a config file that has an error in it. who knows? the only thing i can see in here which is actionable is that the solution must be something to do with forking.conf?? but maybe not, because ive never heard of that file so it can't be my fault

mastodon.social/media/JCQiBedA

part 6: maybe i do need the apache log after all

so i dont think the service status program is going to tell me anything useful. i need to go straight to the source. straight in there. thats right im gonna need to go look at the apache error.log. and thats not easy. u gotta kinda pull ur own watergate break-in, by giving the computer your root password. pretty exciting stuff.

anyway. error.log is completely empty. error.log.1 does have stuff, but stops in november

mastodon.social/media/z-QGRCOT

part 7: ok so i need to type shit into google to solve this problem

now im typing some stuff into google. i'm typing stuff such as "find out why apache won't start" and theres some results including someone who's like "apache won't start and theres nothing in the logs" which seems to be the same problem as me!

ok their problem is that they dont have a log directory at all. and needed to create it. so thats not the same problem at all

part 8: typing more shit into google

heres some other result. askubuntu.com/questions/119571

its from ask ubuntu. and my server is debian. but i figure it should be the same right. i guess

anyway. the answer says "sudo /etc/init.d/apache2 restart" and see what error i get. im going to type that even though its pretty similar to what i've seen before

okay i just get the same error message that i get from typing sudo service apache2 start. so thats not a very valuable answer

part 9: typing in shell commands that random people on a website have suggested to someone else several years ago

someone else says:

"I wasn't getting any error messages, but source /etc/apache2/envvars && /usr/sbin/apache2 worked for me. (on Debian)"

and i typed that, and, well, it seems to have done somethin! yes, in fact, just running the apache2 executable gives me useful info. no idea how to find that info when starting it as a service, though. but im glad just running it told me stuff

part 10: cleanin up

so it seems the problem has been caused by a bunch of missing directories that should have existed for websites that i no longer host. so i just needed to delete em outta sites-enabled. thats all it is

anyway. ugh

part 11: linux people please read that thread & think about whether any of that is a good experience. and don't respond telling me im wrong. if you respond i'm gonna block you

Follow

@jk but just think of the feeling of achievement you got when it finally worked!

nah, it does indeed suck

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!