My opening page use to work fine, but now it doesn't. What's wrong? index.html is locted in the root folder.

I have index.html in the root folder.(/home/swarr22/root) https://warrgames.net does not open it. It says "This site cannot be reached"

5 Replies

You need to put all HTML is the root of the Domain folder, not the server "home."

I don't know how you did your domain mapping but you probably have a folder like: /var/www/html/your-domain.com/public_html

Go to the warrgames.net.conf in /etc/apache/sites-available folder and see what your document root folder is called.

For example:

In: /etc/apache2/sites-available/my-domain.conf file

# domain: my-domain.com 
# public: /var/www/html/my-domain.com/public_html/
<VirtualHost *:80>
  ServerAdmin webmaster@my-domain.com
  ServerName  my-domain.com
  ServerAlias www.my-domain.com
  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/html/my-domain.com/public_html
^^^^^^^^^^^^^^^

index.html is located in /var/www/html/ and it is correct. I made no changes to it. Could SSL have something to do with it not loading?
There is no need to have SSL in this opening page.

I have sub programs that use SSL and work fine (for example: https://warrgames.net:49999

I don't think Apache is running. I ran an nmap command against your hostname and found the HTTP and HTTPS ports are closed while port 49999 is open:

$ nmap -Pn -p 80,443,49999 warrgames.net
[...]

PORT      STATE  SERVICE
80/tcp    closed http
443/tcp   closed https
49999/tcp open   unknown

Nmap done: 1 IP address (1 host up) scanned in 0.13 seconds

When a port is closed no service is using it to listen for connections. I suggest checking if Apache is running and restarting Apache if it isn't:

$ sudo systemctl status apache2
$ sudo systemctl restart apache2

You mentioned that you don't necessarily need SSL on the warrgames.net page. Right now, when I input "warrgames.net" into my browser, it's redirecting to "https://warrgames.net" so at one point I think there was an SSL cert associated with the page. You may just need to update the cert once the site is back up and running.

My suggestion would be to remove your old certificate files that can be found in the /etc/letsencrypt directory and install a new SSL cert using Certbot. Certbot renews certificate files automatically so you don't need to worry about them expiring, and it's free!

I run sudo systemctl status apache2 And I get:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2023-11-21 14:30:49 CST; 11min a
Process: 30075 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAIL
Main PID: 24297 (code=exited, status=1/FAILURE)

Nov 21 14:30:49 warrgames systemd[1]: Starting The Apache HTTP Server…
Nov 21 14:30:49 warrgames apachectl[30075]: Action 'start' failed.
Nov 21 14:30:49 warrgames apachectl[30075]: The Apache error log may have more i
Nov 21 14:30:49 warrgames systemd[1]: apache2.service: Control process exited, c
Nov 21 14:30:49 warrgames systemd[1]: apache2.service: Failed with result 'exit-
Nov 21 14:30:49 warrgames systemd[1]: Failed to start The Apache HTTP Server.

I run sudo systemctl restart apache2 And I get:
swarr22@warrgames:~$ sudo systemctl restart apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

I run sudo systemctl status apache2 And I get:
swarr22@warrgames:~$ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2023-11-21 14:46:34 CST; 2min 21
Process: 30412 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAIL
Main PID: 24297 (code=exited, status=1/FAILURE)

Nov 21 14:46:34 warrgames systemd[1]: Starting The Apache HTTP Server…
Nov 21 14:46:34 warrgames apachectl[30412]: Action 'start' failed.
Nov 21 14:46:34 warrgames apachectl[30412]: The Apache error log may have more i
Nov 21 14:46:34 warrgames systemd[1]: apache2.service: Control process exited, c
Nov 21 14:46:34 warrgames systemd[1]: apache2.service: Failed with result 'exit-
Nov 21 14:46:34 warrgames systemd[1]: Failed to start The Apache HTTP Server.

I run sudo journalctl -xe and I get:
Nov 21 14:49:40 warrgames sshd[30462]: Failed password for root from 92.27.101.9
Nov 21 14:49:40 warrgames sshd[30462]: Received disconnect from 92.27.101.99 por
Nov 21 14:49:40 warrgames sshd[30462]: Disconnected from authenticating user roo
Nov 21 14:50:01 warrgames sshd[30464]: pam_unix(sshd:auth): authentication failu
Nov 21 14:50:03 warrgames sshd[30464]: Failed password for root from 138.197.77.
Nov 21 14:50:03 warrgames sshd[30464]: Connection closed by authenticating user
Nov 21 14:50:10 warrgames sshd[30458]: Did not receive identification string fro
Nov 21 14:50:31 warrgames sshd[30466]: Did not receive identification string fro
Nov 21 14:50:43 warrgames sshd[30469]: pam_unix(sshd:auth): authentication failu
Nov 21 14:50:44 warrgames sshd[30471]: Invalid user nw from 112.161.214.48 port
Nov 21 14:50:44 warrgames sshd[30471]: pam_unix(sshd:auth): check pass; user unk
Nov 21 14:50:44 warrgames sshd[30471]: pam_unix(sshd:auth): authentication failu
Nov 21 14:50:45 warrgames sshd[30469]: Failed password for root from 92.27.101.9
Nov 21 14:50:45 warrgames sshd[30469]: Received disconnect from 92.27.101.99 por
Nov 21 14:50:45 warrgames sshd[30469]: Disconnected from authenticating user roo
Nov 21 14:50:46 warrgames sshd[30471]: Failed password for invalid user nw from
Nov 21 14:50:46 warrgames sshd[30471]: Received disconnect from 112.161.214.48 p
Nov 21 14:50:46 warrgames sshd[30471]: Disconnected from invalid user nw 112.161
Nov 21 14:50:51 warrgames sshd[30467]: pam_unix(sshd:auth): authentication failu
Nov 21 14:50:53 warrgames sshd[30467]: Failed password for root from 103.180.149
Nov 21 14:51:00 warrgames sshd[30467]: Connection closed by authenticating user
Nov 21 14:51:11 warrgames sudo[30475]: swarr22 : TTY=pts/0 ; PWD=/home/swarr22
Nov 21 14:51:11 warrgames sudo[30475]: pam_unix(sudo:session): sessio

HELP!

Something is preventing Apache from starting but the journalctl -xe command isn't really helping too much.

This post titled How do I check my server's log files? has some helpful tips for checking your log files. Specifically, you'll want to check /var/log/apache2/error.log to see what errors are printing out.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct