Thread: Apache SSL vhosts
hi,
have small problem on apache conf , i've searched every , looked hundred times conf, cant fix !
activated ssl certificate on 1 vhost, ssl activated on vhosts.
if you use servername, should working servername.... it's on of them...
hope can this, dont know if it's conf problem or bug of version of apache2, because far remember working fine, , haven't changed conf.
email googlebot pointed new problem
on vhosts:
- on port 80, example.com , www.example.com point /var/www/example/
- on port 80 , 443 shop.example.com point /var/www/example2/
why server listening on port 443 on example.com , www.example.com ???
hope can help, anyway
edit :
if dont have default virtual host apache take first 1 available
adding virtualhost <virtualhost 192.168.0.1:443> without servername , sslengine off fixed problem
here apache2.conf
and here vhostscode:serverroot "/etc/apache2" lockfile ${apache_lock_dir}/accept.lock pidfile ${apache_pid_file} timeout 60 keepalive on keepalivetimeout 10 maxkeepaliverequests 800 serverlimit 10 <ifmodule mpm_prefork_module> startservers 20 minspareservers 5 maxspareservers 32 maxclients 600 maxrequestsperchild 0 </ifmodule> <ifmodule mpm_worker_module> startservers 4 minsparethreads 50 maxsparethreads 125 threadlimit 100 threadsperchild 100 maxclients 500 maxrequestsperchild 1000 </ifmodule> <ifmodule mpm_event_module> startservers 2 maxclients 150 minsparethreads 25 maxsparethreads 75 threadlimit 64 threadsperchild 25 maxrequestsperchild 0 </ifmodule> user ${apache_run_user} group ${apache_run_group} accessfilename .htaccess <files ~ "^\.ht"> order allow,deny deny satisfy </files> defaulttype text/plain adddefaultcharset utf-8 hostnamelookups off errorlog ${apache_log_dir}/error.log include mods-enabled/*.load include mods-enabled/*.conf logformat "%v:%p %h %l %u %t \"%r\" %>s %o \"%{referer}i\" \"%{user-agent}i\"" vhost_combined logformat "%h %l %u %t \"%r\" %>s %o \"%{referer}i\" \"%{user-agent}i\"" combined logformat "%h %l %u %t \"%r\" %>s %o" common logformat "%{referer}i -> %u" referer logformat "%{user-agent}i" agent servertokens prod serversignature off traceenable off <ifmodule mod_fastcgi.c> . fastcgiexternalserver /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header authorization . addhandler php5-fcgi .php . <locationmatch "/(ping|status)"> . . sethandler php5-fcgi-virt . . action php5-fcgi-virt /php5-fcgi virtual . . order deny,allow . . deny . . allow 87.111.80.241 . </locationmatch> . action php5-fcgi /php5-fcgi . alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi </ifmodule> listen 80 namevirtualhost 213.186.44.73:80 <ifmodule mod_ssl.c> . listen 443 . namevirtualhost 213.186.44.73:443 </ifmodule> include sites-enabled/
code:<virtualhost 192.168.0.1:80> . serveradmin email@example.com . servername example.com . serveralias www.example.com . documentroot /var/www/example/ . <directory /var/www/example/> . . options indexes -followsymlinks multiviews . . allowoverride . . order allow,deny . . allow . </directory> </virtualhost> <virtualhost 192.168.0.1:80> . serveradmin email@example.com . servername shop.example.com . documentroot /var/www/example2/ . <directory /var/www/example2/> . . options +execcgi indexes followsymlinks multiviews . . allowoverride . . order allow,deny . . allow . </directory> </virtualhost> <virtualhost 192.168.0.1:443> . serveradmin email@example.com . servername shop.example.com . sslengine on . sslcertificatefile /etc/apache2/certificates/shop_example_com.crt . sslcertificatekeyfile /etc/apache2/certificates/shop_example_com.key . sslcertificatechainfile /etc/apache2/certificates/gd_bundle.crt . documentroot /var/www/example2/ . <directory /var/www/example2/> . . options +execcgi indexes followsymlinks multiviews . . allowoverride . . order allow,deny . . allow . </directory> </virtualhost>
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] Apache SSL vhosts
Ubuntu
Comments
Post a Comment