Timeout during connect (likely firewall problem), deleted cert and failed to reinstall

Hi @MikeMcQ thank for your prompt reply.

There is another staging site in the server, when i first install sudo certbot --apache, I installed for all the domains and this file mssbweb-dev-le-ssl.conf comes first

I was trying with this solution here SSLCertificateFile: file doesnt exist or is empty - #3 by tolgacan just a few moments ago. to comment out the said Syntax error line 7.
and the server failed to start.

apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: inactive (dead) since Fri 2022-07-15 13:46:20 UTC; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6329 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 6011 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
  Process: 6308 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

How should I unblocked my port 443 and how can I restart my server in this case?

--

Updates: I run sudo ufw allow 443 and sudo ufw status verbose

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
443                        ALLOW IN    Anywhere                  
443 (v6)                   ALLOW IN    Anywhere (v6)         

However, when i run netstat -tnl, it doesn't show 443

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:29131         0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:1270            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN   

Still unable to start the server.

sudo systemctl restart apache2
returns

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

systemctl status apache2.service
returns

● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Fri 2022-07-15 15:02:44 UTC; 1min 13s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10057 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jul 15 15:02:44 MSSBWebUbuntu apache2[10057]:  * The apache2 configtest failed.
Jul 15 15:02:44 MSSBWebUbuntu apache2[10057]: Output of config test was:
Jul 15 15:02:44 MSSBWebUbuntu apache2[10057]: AH00526: Syntax error on line 7 of /etc/apache2/sites-enabled/mssbweb-dev-le-ssl.conf:
Jul 15 15:02:44 MSSBWebUbuntu apache2[10057]: SSLCertificateFile: file '/etc/letsencrypt/live/microlink.com.my/fullchain.pem' does not exist or is empty
Jul 15 15:02:44 MSSBWebUbuntu apache2[10057]: Action 'configtest' failed.
Jul 15 15:02:44 MSSBWebUbuntu apache2[10057]: The Apache error log may have more information.
Jul 15 15:02:44 MSSBWebUbuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Jul 15 15:02:44 MSSBWebUbuntu systemd[1]: Failed to start LSB: Apache2 web server.
Jul 15 15:02:44 MSSBWebUbuntu systemd[1]: apache2.service: Unit entered failed state.
Jul 15 15:02:44 MSSBWebUbuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
1 Like