server-side/apache

XAMPP 아파치 가상서버 SSL 설정

C/H 2015. 8. 19. 16:12

<virtualhost *:443>
	ServerAdmin username@gmail.com
	ServerName example.com
	DocumentRoot "/home/username/workspace/project"
	ErrorLog "logs/example.com-error.log"
	CustomLog "logs/example.com-access.log" common
	<directory "/home/username/workspace/project/">
		#Order allow,deny
		#Allow from all
		AllowOverride All
		Require all granted
	</directory>
	SSLEngine on
	SSLCertificateFile conf/ssl.crt/server.crt
	SSLCertificateKeyFile conf/ssl.key/server.key
</virtualhost>


<VirtualHost *:4443>
	ServerAdmin username@gmail.com
	ServerName example.com
	DocumentRoot "/home/username/workspace/project"
	ErrorLog "logs/example.com-error.log"
	CustomLog "logs/example.com-access.log" common
	SSLEngine on
	SSLCertificateFile "/home/username/ssl/ssl-sha2.crt"
	SSLCertificateKeyFile "/home/username/ssl/ssl-sha2.key"
	SSLCertificateChainFile "/home/username/ssl/rsa-dv.chain-bundle.pem"
	SSLCACertificateFile "/home/username/ssl/AddTrustExternalCARoot.crt"
	<Directory /home/username/web>
		Options FollowSymLinks
		AllowOverride All
		Order allow,deny
		Allow from all
	</Directory>
</VirtualHost>

Invalid command 'SSLEngine'

sudo /etc/init.d/httpd restart
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration

sudo yum install mod_ssl -y

sudo /etc/init.d/httpd configtest
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Wed Dec 16 17:01:42 2015] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Wed Dec 16 17:01:42 2015] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
Syntax OK


httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

/etc/https/conf/httpd.conf ServerName *:80 # or ServerName localhost:80

[warn] _default_ VirtualHost overlap on port 443, the first has precedence

/etc/https/conf/httpd.conf
ServerName *:80
ServerName *:443
wget -O- https://localhost:443

반응형

'server-side > apache' 카테고리의 다른 글

아파치 성능도구 ab  (0) 2017.02.22
Mac XAMPP VirtualHost 설정  (0) 2015.12.28
아파치 특정 IP 차단 및 허용  (0) 2010.09.07
apache httpd.conf 설정파일  (0) 2010.09.03
mod_rewrite 설정  (0) 2010.08.16