I've installed and configured apache. Thing is though, it doesn't seem to be able to find my root folder. It seems to pass a configtest ...
Code:
root@server1:/var/www# sudo apache2ctl configtest
Syntax OK
This is my virtual host ...
Code:
root@server1:/etc/apache2/sites-available# cat mydomain.conf
<VirtualHost *:80>
ServerAdmin dara@work_domain.com
ServerName mydomain
ServerAlias www.mydomain
DocumentRoot /var/www/mydomain
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
apache2.conf in pastebin ... apache2.conf
I've reloaded apache2. Linked it with a a2ensite mydomain. Disabled default*.conf. Done a 'mkdir mydomain' and a 'chmod -R 755 mydomain/*'.
Done everything i can think of. Still get a 404 for the domain on localhost ...
Code:
root@server1:/etc/apache2# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-06-04 17:07:35 IST; 25min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 32382 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 32387 (apache2)
Tasks: 7 (limit: 9255)
Memory: 14.8M
CGroup: /system.slice/apache2.service
├─32387 /usr/sbin/apache2 -k start
├─32388 /usr/sbin/apache2 -k start
├─32389 /usr/sbin/apache2 -k start
├─32390 /usr/sbin/apache2 -k start
├─32391 /usr/sbin/apache2 -k start
├─32392 /usr/sbin/apache2 -k start
└─32680 /usr/sbin/apache2 -k start
Jun 04 17:07:34 server1.hahamarketing.com systemd[1]: Starting The Apache HTTP Server...
Jun 04 17:07:35 server1.hahamarketing.com systemd[1]: Started The Apache HTTP Server.
Nothing really in the error log ...
Code:
root@server1:/etc/apache2# tail /var/log/apache2/error.log
[Thu Jun 04 16:54:13.680250 2020] [core:notice] [pid 31507] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jun 04 17:02:45.379545 2020] [mpm_prefork:notice] [pid 31507] AH00169: caught SIGTERM, shutting down
[Thu Jun 04 17:02:46.105739 2020] [mpm_prefork:notice] [pid 31965] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Thu Jun 04 17:02:46.105777 2020] [core:notice] [pid 31965] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jun 04 17:05:37.717949 2020] [mpm_prefork:notice] [pid 31965] AH00171: Graceful restart requested, doing restart
[Thu Jun 04 17:05:38.179520 2020] [mpm_prefork:notice] [pid 31965] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Thu Jun 04 17:05:38.179538 2020] [core:notice] [pid 31965] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jun 04 17:07:34.786167 2020] [mpm_prefork:notice] [pid 31965] AH00169: caught SIGTERM, shutting down
[Thu Jun 04 17:07:35.590560 2020] [mpm_prefork:notice] [pid 32387] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Thu Jun 04 17:07:35.590589 2020] [core:notice] [pid 32387] AH00094: Command line: '/usr/sbin/apache2'
Could it be a hostname error ? I typed in the hostname wrong on a gitlab installation and now my local system has the name of my remote domain. Not sure that'd effect apache though ..
Bookmarks