0

I have two sites site1.mydomain.com and site2.mydomain.com on a Amazon Linux 2 instance. I used a Loadbalancer and a godaddy certifcate with subdomains site1 and site2 but for cost reasons wanted to get rid of the loadbalancer and install the certifcate directly on the machine. I managed that.. but now the sites only show the Apache boilerplate page.. and not the content in my var/www/html/site1 and site2 folders. What do i have to write in the httpd.conf file or where do i have to fiddle?

I followed the instructions to install a ssl certificate on the AWSLinux2 instance.. but then it would not show my sites anymore. My godaddy certificate has all the subdomains registered.

I get for example

[ec2-user@embatek ~]$ apachectl -S
VirtualHost configuration:
*:80                   embatek.com.br (/etc/httpd/conf/httpd.conf:87)
*:433                  embatek.com.br (/etc/httpd/conf/httpd.conf:95)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex default: dir="/run/httpd/" mechanism=default 
Mutex mpm-accept: using_defaults
Mutex cache-socache: 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 lua-ivm-shm: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48 not_used
Group: name="apache" id=48 not_used
[ec2-user@embatek ~]$ 
8
  • You don't show us any configuration. There's no way we can tell you whats wrong.
    – vidarlo
    Nov 17, 2022 at 19:53
  • Well..I added apacheconfig -S to the file.
    – pierre fro
    Nov 17, 2022 at 20:13
  • Can you show us your config? Your actual apache config files? Based on http connection to embatek.com.br you've configured TLS on port 80.
    – vidarlo
    Nov 17, 2022 at 20:19
  • how would I upload the httpd.conf e ssl.conf files?
    – pierre fro
    Nov 17, 2022 at 20:20
  • I have posted my ssl.config and httpd.conf files here.. I tried to paste as code.. but it looked to messy. dropbox.com/sh/vbo8bwag6jr6fuo/AACQ2HYL53nIpBgUzsOMUHnoa?dl=0
    – pierre fro
    Nov 17, 2022 at 20:33

1 Answer 1

0

*:433 embatek.com.br (/etc/httpd/conf/httpd.conf:95)

This is the wrong port. The port for https is 443.

Edit line 95 of your httpd.conf to read <VirtualHost *:443> and try again.

4
  • I thank you SSOOOO much.. That did the trick.. Lost two workdays on this. I am a legastenic.. it seems.. 443 vs 433... what a SNAFUS.. I put the Virtualhost *:443 directive in the ssl.conf file and now all works..
    – pierre fro
    Nov 18, 2022 at 18:26
  • I missed it a first readthrough as well. But please accept the question if it solved the problem. Otherwise it will pop every now and then.
    – vidarlo
    Nov 18, 2022 at 20:23
  • Hi Vidarlo, how? do I mark as solved? Just clicking on the green OK. Did that. Thanks again for your help.
    – pierre fro
    Nov 20, 2022 at 10:44
  • Yup, that's it :)
    – vidarlo
    Nov 20, 2022 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.