Secondary domain not loading it's path - loads primaries stuff
Ok so I'm tinkering about and trying to figure this out (hey a rhyme..)
So I'm at a loss. On my old ubuntu config 18.04 everything worked spectacularly .. trying 21.10 now and it's nothing but an uphill battle of nothing ever works on every single front lol
So here's the issue, two domains, nonetforyou.com is primary, and loonacies.com is secondary. (Hey it was available why not?)
Linode manager, both are set as a primary under "domains."
Directories are set /var/www/html/nonetforyou.com/public_html, and the same for var/www/html/looncies.com/public_html
I've already ran into and solved glorious certbot problems with domain not resolving properly (somehow.. don't know what I did), so now I 'll leave you with my config files as they currently exist, and maybe someone can throw me a suggestion.
yes they've been sudo a2ensite'd, and yes i've sudo systemcattlerestarted apache2.
And I apologize for the formatting.. I don't know how to make this thing pay attention to my spacing. (Please bring back the old forum guys lol)
---- nonetforyou.com.conf
<directory html="" nonetforyou.com="" public_html="" var="" www="">
Require all granted
</directory>
<virtualhost *:80="">
ServerName nonetforyou.com
ServerAlias www.nonetforyou.com
ServerAdmin contact@localhost
DocumentRoot /var/www/html/nonetforyou.com/public_html
ErrorLog /var/www/html/nonetforyou.com/logs/error.log
CustomLog /var/www/html/nonetforyou.com/logs/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =nonetforyou.com [OR]
RewriteCond %{SERVER_NAME} =www.nonetforyou.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</virtualhost>
--loonacies.com.conf
<directory html="" loonacies.com="" public_html="" var="" www="">
Require all granted
</directory>
<virtualhost *:80=""></virtualhost>
ServerName loonacies.com
ServerAlias www.loonacies.com
ServerAdmin contact@localhost
DocumentRoot /var/www/html/loonacies.com/public_html
ErrorLog /var/www/html/loonacies.com/logs/error.log
CustomLog /var/www/html/loonacies.com/logs/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =loonacies.com [OR]
RewriteCond %{SERVER_NAME} =www.loonacies.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
---- Apache2.conf - Removed the hashed out stuff.
DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 50
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/.load
IncludeOptional mods-enabled/.conf
Include ports.conf
<directory>
Options FollowSymLinks
AllowOverride None
Require all denied
</directory>
<directory share="" usr="">
AllowOverride None
Require all granted
</directory>
<directory var="" www="">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</directory>
AccessFileName .htaccess
<filesmatch "^\.ht"="">
Require all denied
</filesmatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/.conf
Include sites-enabled/.conf
Include /etc/phpmyadmin/apache.conf
5 Replies
That's what throws me too. A simple getup'. Domain one is "REEEEEE", while domain two in the other folder path should be saying REEEEE reeee.
I have a way with words lol
Half a mind to shrink my 18.04 ubuntu, clone it, and attempt distro upgrades. 20x has all been nothing less than impossible for me and I can't figure out why.
Sat Jan 08 17:50:54.139547 2022] [php7:error] [pid 11030] [client 144.76.71.176:33804] script '/var/www/html/loonacies.com/public_html/index.php' not found or unable to stat
Just had time to sit down and figured I'd check the logs for that.. really does exist. Odd.. Back to beating my head against it for a bit.. I added a basic index.php just to see if that would kill the error, nope. Not sure why it's trying to find that file to begin with.. Well if this submit button which is merged with accept answer would let me submit my update I'll get back to banging my head against it lol
AHHHHHHHHHHHHHH I got it!
It's frickin' Cerbot!
I did did the ssl bit, i expanded my certificate but i never created an ssl conf. Only figured that out when I realized I couldn't even FORCE apache to change root directory. What was left? ssl…
There you have it, anyone out there in the same boat as I am? It's cerbot certs. Just play along with it.
Thanks for trying my man. I do appreciate it.