Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
If you want to pass extra arguments to httpd, edit the
/etc/sysconfig/httpd config file.
VirtualHost configuration:
*:443 is a NameVirtualHost
default server teachersbook.pk (/etc/httpd/conf.d/ssl.conf:40)
port 443 namevhost teachersbook.pk (/etc/httpd/conf.d/ssl.conf:40)
port 443 namevhost teachersbook.pk (/etc/httpd/conf.d/teachersbook.pk-le-ssl.conf:2)
alias www.teachersbook.pk
*:80 teachersbook.pk (/etc/httpd/conf.d/teachersbook.pk.conf:11)
There is a name:port overlap for teachersbook.pk:443 between these files: /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/teachersbook.pk-le-ssl.conf
The HTTP vhost config seems to lack the "www" alias (in file:) /etc/httpd/conf.d/teachersbook.pk.conf
For #1, I would try changing the ServerName directive in the ssl.conf file to anything else
[like: ServerName localhost]
For #2, I would add a line with ServerAlias www.teachersbook.pk in the file teachersbook.pk.conf immediately after line with ServerName teachersbook.pk
Like: ServerName teachersbook.pk ServerAlias www.teachersbook.pk
Then it is using the default ServerName likely provided within the main config.
I would just add the line in there (to ssl.conf).
Something like: ServerName localhost
today I've successfully recovered my website and also apply your said changes in
1- ssl.conf file
also try to change some change in
2- teachersbook.pk-le-ssl.conf
but nor working.. in both files I've commented remarks where I've made change.
code in ssl.conf is below
Listen 443 https
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
SSLSessionCache shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout 300
SSLCryptoDevice builtin
#SSLCryptoDevice ubsec
<VirtualHost _default_:443>
# General setup for the virtual host, inherited from global configuration
#DocumentRoot "/var/www/html"
#ServerName teachersbook.pk:443 // also tried this not working
#ServerName localhost // here I've changed not working
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
#SSLProtocol all -SSLv3
#SSLProxyProtocol all -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
#SSLVerifyClient require
#SSLVerifyDepth 10
#<Location />
#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>
# SSL Engine Options:
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"</code>
</VirtualHost>
code in /etc/httpd/conf.d/teachersbook.pk.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName teachersbook.pk // here I've changed ServerName localhost not working
ServerAlias www.teachersbook.pk
ServerAdmin test@gmail.com
DocumentRoot /var/www/teachersbook.pk/
ErrorLog /var/log/httpd/teachersbook.pk-error.log
CustomLog /var/log/httpd/teachersbook.pk-access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/teachersbook.pk/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/teachersbook.pk/privkey.pem
</VirtualHost>
</IfModule>