Where's the right place to put my vhost config for SSL
/opt/lamp/etc/extra/httpd-vhosts.conf or in httpd.conf ?
Currently, my configuration for SSL is located in httpd-vhosts.conf
<VirtualHost *:1223>
DocumentRoot "/opt/lampp/htdocs/api_tk_b/public"
DirectoryIndex index.php
ServerName api-b.mydomain.com
ServerAlias api-b.mydomain.com
ServerAdmin *.mydomain.com
#SSLEngine on
#SSLCertificateFile "/opt/lampp/htdocs/crt/gd.crt"
#SSLCertificateKeyFile "/opt/lampp/htdocs/crt/mydomain.key"
#SSLCACertificateFile "/opt/lampp/htdocs/crt/gd-bundle.crt"
<Directory "/opt/lampp/htdocs/api_tk_b/public">
Options All
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/api_b-error_log"
CustomLog "logs/api_b-access_log" common
</VirtualHost>
But it's not working, I don't think the error is in my crt
, key
and bundle
maybe there's something I need to do first before doing this?
I'm using GoDaddy as of now
My Update
This is my update as of now.
First, Why *:1223
because I have multiple projects I have in the server and uses sub-domain but these projects are not using ssl that's why I tried to use 1223 to make it work too.
api-b.mydomain.com
is now working if I comment the SSL configuration
and When I comment out the SSL configuration
the apache fail to restart.
It keeps running but, when I try to access on web
using this link: https://api-b.mydomain.com
the web says
This site can’t be reached api-b.mydomain.com refused to connect.
Note:
My key folder is exists and my key files are not empty.
This configuration code is working in Windows
but not in linux
is there any configuration do I need to do?
Also
If I access the error.log, it's not empty but there's no connected issue occured in the log related to my api and the api-b-error.log is empty too
/opt/lampp/etc/extra/httpd-vhosts.conf api-a.mydomain.com