vhosts
How should I organize multiple Express servers on the same system?
Since Express uses Connect, I’m pretty sure you can use Connect’s virtual host middleware. It operates similar to other vhost modules on other products. I don’t have multiple domains to test and show you proper code, but I would think it’s something like this: express.createServer() .use(express.vhost(‘hostname1.com’, require(‘/path/to/hostname1’).app) .use(express.vhost(‘hostname2.com’, require(‘/path/to/hostname2’).app) .listen(80) If you get to the … Read more
Apache giving 403 forbidden errors
Check that : Apache can physically access the file (the user that run apache, probably www-data or apache, can access the file in the filesystem) Apache can list the content of the folder (read permission) Apache has a “Allow” directive for that folder. There should be one for /var/www/, you can check default vhost for … Read more
nginx – set multiple server_name with ssl-support
Edit November 2014: the initial answer is not correct and is incomplete ; it needed a refresh! here it is. Basically, there are two cases You own a wildcard certificate (or multi-domains certificate) In this case, you may use several vhosts listening to the same IP address/https port, and both vhosts use the same certificate … Read more
Adding VirtualHost fails: Access Forbidden Error 403 (XAMPP) (Windows 7)
Okay: This is what I did now and it’s solved: My httpd-vhosts.conf looks like this now: <VirtualHost dropbox.local:80> DocumentRoot “E:/Documenten/Dropbox/Dropbox/dummy-htdocs” ServerName dropbox.local ErrorLog “logs/dropbox.local-error.log” CustomLog “logs/dropbox.local-access.log” combined <Directory “E:/Documenten/Dropbox/Dropbox/dummy-htdocs”> # AllowOverride All # Deprecated # Order Allow,Deny # Deprecated # Allow from all # Deprecated # –New way of doing it Require all granted </Directory> … Read more
How to redirect to a different domain using Nginx?
server_name supports suffix matches using .mydomain.example syntax: server { server_name .mydomain.example; rewrite ^ http://www.adifferentdomain.example$request_uri? permanent; } or on any version 0.9.1 or higher: server { server_name .mydomain.example; return 301 http://www.adifferentdomain.example$request_uri; }