Worpress with apache?

Hey there
Another short question:

I set up a Wordpress site with apache and debian.
So now my site is available, just under IP-adress, but ok. Domain should be active in a few days.

When i go to the ip of the server in the browser, i get to the (first) apache default page, then, after deleting this, to just the directory , where i can choose the wordpress folder. Then i get to my wordpress site.
When i want to visit my site, i need to type “IPADRESS/wordpress”.

So this is normally not what i / we want.

Question:
How can I change the default page beeing loaded when accessing the IPv4 adress of my server.

When i point an A-record of my domain to the ip of the server, the Wordpress Site should appear, and not some shitty Apache site or so on. And however, i cannot point an A-Record to “IPADRESS/wordpress”, who knows why, i think it has just to be an lonely ip-adress.

Like you see, i’m not the very best apache-pro…

Thanks for helping.

Greetings

If you change the apache2 configuration file at /etc/apache2/sites-available/000-default.conf to point to your wordpress folder as the root folder of your website you wont need to add /wordpress to your ip address. I would highly recommend reading Jay’s book on setting up apache, as it’s pretty thorough. But this site is more specific to wordpress. It’ll get you a really basic wordpress instance running.

Hey there.
I changed the DocumentRoot variale to “/var/www/html/wordpress”.
But nothing happened.
Made control in all de .conf files, sites-available and also sites-enable.
Should alsoi be correct.

What is my mistake?

Greetings

Mandelbrot

<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request’s Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/wordpress
    SSLProtocol -all +TLSv1.3
    SSLCertificateFile /etc/apache2/sites-available/cert.pem
    SSLCertificateKeyFile /etc/apache2/sites-available/key.pem

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf

vim: syntax=apache ts=4 sw=4 sts=4 sr noet

with http it does not function properly.

with https:

Not Found

The requested URL was not found on this server.

Have you enabled the ssl module for Apache? Do you have the cert and key files in the /etc/apache2/sites-available directory? Is there a firewall rule blocking port 443? Did you restart the apache2 service after enabling the ssl module and updating the .conf files?

SSL module is enablede.
Cert and Key file is in place.
Firewall is open on 443.
Apache was restarted when i changed something.
Tried to reboot the server, didn’t work.

BUT:
I think this is shitty anyway.
In one of jays videos, he uses certbot for encryption over HTTPS / TLS and this works properly, also for me.
I think, the way I’ve tried to encrypt my website is just old or in another way shitty. The Certificate is self signed, and when i visit my website, there is a warning, thus like this would be is a security issue.

And perhaps there is someting broken generally in those configurations i did.

Maybe i’ts the best, to set up Wordpress again and encrypt it with certbot with a better certificate. So there is no warning, when i visit my website.
I’ve encrypted my nextcloud with certbot (like jay shows in his video) and it all works. so, thinks this should be better anyway.

So: Thank you very much. But it could be the best to start all over again, when I have the time.
I will use your link above, to set up wordpress in a good way.

Greetings

Mandelbrot