Okay There were no videos or any Good Guides on setting CertBot at CentOS6
I remind that during installation It Gave me a warning regarding ‘No Vhosts’ or something like that
It Messed up my Apache Installation and now it’s not even running
I tried ‘service httpd restart’ Stopping httpd was okay but Failed to stary httpd
So I’ve Tried to remove httpd then re-install it… Still not starting !
Help me out ! And Please Give me solution ASAP, I’m in Trouble !
If the configuration changes that broke apache were made by certbot, you can use the certbot rollback (or ./certbot-auto rollback) command to revert those changes. Removing the httpd package will not delete the configuration in /etc/httpd AFAIK, so it would make sense that this does not fix your problem.
If the rollback command doesn’t get you anywhere, please provide the error message you get when apache fails to start, and we can try to fix the errors manually. You should be able to see that message either when you’re restarting apache, in your apache error log or in your system log.
Once apache is working again, prepare the configuration for certbot:
Certbot works best if your <VirtualHost> definitions are in a separate file, with one <VirtualHost> tag per file. I would recommend moving all your <VirtualHost> directives to separate files in /etc/httpd/conf.d. For example, if you have two separate vhosts, one for example.com and one for foo.example.com, you might have /etc/httpd/conf.d/example.com.conf and /etc/httpd/conf.d/foo.example.com.conf. The CentOS documentation on the certbot homepage should be sufficient once your configuration is prepared in this way. Certbot will then create two additional files with SSL vhosts for you.
Here after Doing Everything, When I try to stop all apache processes through sudo apachectl -k stop command I got an error
Syntax error on line 1009 of /etc/httpd/conf/httpd.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)
I know that's kinda not related with CertBot but, can you just help me in this part ?!
I can't continue due to this..
Okay Very Cool !
It seems that you’re a real pro in this !
Let’s move on…
So After Doing Everything on the Digital Ocean Tut, I tried to run the cmd ./certbot-auto
Which led me to choose between 2 domains…
*www.mydomain.com
*domain.com
I Clicked on the www one which led me to this… (And Vice-Versa For The non-www one)
So Then, I decided to remove ServerAlias and done everything else like restarting Apache and all… Then I executed ./certbot-auto once more… as a result there was no non-www version…
I proceeded with www version, once more no luck ! That led me to the same screen with the same error !
So Yeah, That’s awkward !
it's expecting only one host in /etc/httpd/conf/httpd.conf rather than all the accounts in a single file. It's the same thing that pfg was referring to earleri ....
At the moment you have all the domain entries ( I assume) in one file - /etc/httpd/conf/httpd.conf
You can spit that up into multiple files - one file per domain and place them all in /etc/httpd/conf.d
/etc/httpd/conf.d/ssl.conf.rpmsave:# Point SSLCertificateFile at a PEM encoded c ertificate. If /etc/httpd/conf.d/ssl.conf.rpmsave:SSLCertificateFile /etc/letsencrypt/live/www. domain.com/cert.pem /etc/httpd/conf.d/ssl.conf.rpmsave:# the referenced file can be the same as SS LCertificateFile
VPS From Linode
Domain From GoDaddy
CentOS 6 | Apache
So First - As Said here
Though My /etc/httpd/conf/httpd.conf file had only one vhost I had still created a complete different file for my domain at /etc/httpd/conf.d/domain1.conf
Then continued the installation by executing ./certbot-auto
After Getting The Congratulations message I’ve went to mydomain.com which looks like this as expected :