Wordpress (possible apache

So i have hit a new issue, i deleted all my virtual servers ( on purpose) in order to start fresh. I have never had issues before installing wordpress from the script but here is my problem:

The script runs fine and i get a url to complete the WP install, but when i click the url to do the usual, i am receiving

I am receiving error 404 not found.

The requested URL was not found on this server.

Apache/2.4.25 (Debian) Server at xyzxyz.net Port 80

scanned around on google changed the apache2 file as most things seem to suggest, but still nothing?? Any help thank you in advance!

@Adam21 - I’ve installed WP a few times on Virtualmin servers and tbh, I’ve never used the included installers.

I’ve always done an install as detailed at Wordpress.

Have you tried a manual install of WP?

HIH

Dibs

i shall give it a whirl, but hopefully someone at virtualmin can maybe see if it is a bug as ive done a few websites this way before and never had any issues, but thanks for your reply Dibs :smiley:

Good day so i tried it that way as per instructions and now when i navigate i get the apache default page ?? very strange goings on i might say.

Futher more i just tried to add phpmyadmin and i cant access that page correctly either getting the initial error - i have read lots and maybe its a user issue i do not allow root user logins - i set up the server with user with correct sudo creds, this problem has only arisen now though the set up was fine before i deleted the virtual servers.

What happens when you have an “empty” Virtual Server - i.e. no content in the public_html folder and just place a “hello world” type simple index.html file in there?

if you login using ssh to the server and navigate to the domains folder, who owns the folder and what are the folder and files permissions?

Same issues simple index html and i get 404 not found.
xyzxyz.net/index.php bring the default apache page

i use the gui from webmin/virtualmin to log in, sorry was that a question or a do it type thing LOL.

So i checked and it seems like the folder set up does not have the same permissions as root user??

what do the following commands (from CLI) give you

sudo apache2ctl -t
sudo apache2ctl -S
  1. Syntax OK
  2. VirtualHost configuration:
    ServerRoot: “/etc/apache2”
    Main DocumentRoot: “/var/www/html”
    Main ErrorLog: “/var/log/apache2/error.log”
    Mutex default: dir="/var/run/apache2/" mechanism=default
    Mutex mpm-accept: using_defaults
    Mutex fcgid-pipe: using_defaults
    Mutex authdigest-opaque: using_defaults
    Mutex watchdog-callback: using_defaults
    Mutex proxy-balancer-shm: using_defaults
    Mutex rewrite-map: using_defaults
    Mutex ssl-stapling-refresh: using_defaults
    Mutex authdigest-client: using_defaults
    Mutex fcgid-proctbl: using_defaults
    Mutex ssl-stapling: using_defaults
    Mutex proxy: using_defaults
    Mutex ssl-cache: using_defaults
    PidFile: “/var/run/apache2/apache2.pid”
    Define: DUMP_VHOSTS
    Define: DUMP_RUN_CFG
    Define: ENABLE_USR_LIB_CGI_BIN
    User: name=“www-data” id=33
    Group: name=“www-data” id=33

For sudo apachectl -S, is that the full output?

I’ve just run it on my server and I get one block of text per port 80 per Virtual Server and one block per port 433 (where enabled) per Virtual Server.

re-ran command in virtualmin’s cli and output is :

VirtualHost configuration:
185.121.25.12:80 platoonarena.net (/etc/apache2/sites-enabled/platoonarena.net.conf:1)
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex authdigest-client: using_defaults
Mutex fcgid-proctbl: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name=“www-data” id=33
Group: name=“www-data” id=33

When I run that command, the top portion of the results is like the following:

$ sudo apachectl -S
VirtualHost configuration:
my.external.ip.address:80       is a NameVirtualHost
         default server hostingDomain.com (/etc/apache2/sites-enabled/0-hostingDomain.com.conf:1)
         port 80 namevhost hostingDomain.com (/etc/apache2/sites-enabled/0-hostingDomain.com.conf:1)
                 alias www.hostingDomain.com
                 alias mail.hostingDomain.com
                 alias webmail.hostingDomain.com
                 alias admin.hostingDomain.com
         port 80 namevhost Domain1.com (/etc/apache2/sites-enabled/Domain1.com.conf:1)
                 alias www.Domain1.com
                 alias mail.Domain1.com
                 alias webmail.Domain1.com
                 alias admin.Domain1.com

and repeats with similar blocks for the other Virtual Servers.

i get nothing at all like that at all running that command. So im thinking of totally deleting this virtual server and starting again. i take it you use the virtualmin>create new virtual server setup ? All i am then doing is following the usual videos as i watched ages ago on the Vrtualmin youtube channel same with the wordpress install all though i dont seem to be doing anything at all different.

Im so stumped :thinking:

Not perfect - but getting somewhere. Before you delete the Virtual Server - can you post up the contents of it’s Virtual Hosts file\block?

give me one sec i think i may have resolved: nope

so what i did was install my main domain as it was before ALL-PC i can get to the WP install page as i want, yet the 2nd domain/virtual server i can not.

OUTPUT:
VirtualHost configuration:
185.121.25.12:443 all-pc.net (/etc/apache2/sites-enabled/all-pc.net.conf:61)
185.121.25.12:80 is a NameVirtualHost
default server all-pc.net (/etc/apache2/sites-enabled/all-pc.net.conf:1)
port 80 namevhost all-pc.net (/etc/apache2/sites-enabled/all-pc.net.conf:1)
alias www.all-pc.net
alias mail.all-pc.net
alias webmail.all-pc.net
alias admin.all-pc.net
port 80 namevhost platoonarena.net (/etc/apache2/sites-enabled/platoonarena.net.conf:1)
alias www.platoonarena.net
alias mail.platoonarena.net
alias webmail.platoonarena.net
alias admin.platoonarena.net
ServerRoot: “/etc/apache2”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex fcgid-proctbl: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
PidFile: “/var/run/apache2/apache2.pid”
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENABLE_USR_LIB_CGI_BIN
User: name=“www-data” id=33
Group: name=“www-data” id=33

thank you for all your help community peeps!!

What does your 2nd Virtual Server\Domain show when you try to go to it?

did exactly the same ran the script to install WP. getting apache default page.

I’d suggest removing both Virtual Servers - create them again with only just HTTP enabled, place a “Hello World” test index.html file in the public_html folder of each (say “Hello World - Domain1” & “Hello World - Domain 2” files) and see if you can see them.

Get those working - then look to move forward.

1 Like

thank you - i will be back soon :smiley: