apache - How to activate a site in lighttpd -


i newbie lighttpd maintenance. in apache2 when add site(virtual host) file sites-available, have use a2ensite command activate it. if vhost example.conf, have run command below activate it.

sudo a2ensite example 

and restart apache.

i see there other sites in conf-enabled folder, cannot see mine. ran lighttpd-enable-mod on conf file, reason cannot find symlink though restart lighttpd server.

how do same in lighttpd??

edit: adding vhosts

vhost1 >> conf-available/subdomain1.conf

$http["host"] =~ "subdomain1.example.com" { #$server["socket"] == ":80" { proxy.balance = "round-robin" proxy.server = ( "/" => ( ( "host" => "127.0.0.1", "port" => 8081 ) ) ) } 

vhost2 >> conf-available/subdomain2.conf

$http["host"] =~ "subdomain2.example.com" {     #$server["socket"] == ":80" {     proxy.balance = "round-robin" proxy.server = ( "/" =>     ( ( "host" => "127.0.0.1", "port" => 8082 ) ) )     } 

so adding sub domain(subdomain3) on port 8083. , when restart unable subdomain3. web admin helped me on , out on vacation 2 weeks, web developer, not have lot of idea around this.

one thing noticed is, there sym links subdomain1.conf & subdomian2.conf, not have sym link subdomain3.conf file. when curl -i http://127.0.0.1:8083/, 200 , receiving expected data.there no errors in conf file, becaus mirror image of other files, except port , host.

nothing needed add if case specific url/baseurl side supposed reachable from, save config.

make sure config has no syntax errors via lighttpd -t /path/to/config , restart lighttpd afterwards (nowadays systemctl restart lighttpd.service, old /etc/init.d/lighttpd restart)

keep in mind lighttpd not evaluate nor care .htaccess or alike apache config files.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -