I have a setup with multiple domains. and would like to use a variable to simplify this:
# setup rewriting rule to forward to www.sitname.com
server {
server_name sitename.com;
rewrite ^(.*) http://www.sitename.com$1 permanent;
}
server {
server_name www.sitename.com;
root /srv/vhosts/sitename.com/httpdocs;
access_log /srv/vhosts/sitename.com/logs/access.log;
error_log /srv/vhosts/sitename.com/logs/error.log;
Ideally I can create a variable to use in place of sitename.com
Is this possible?
Would the variable be reusable? (Can I reassign it later and use it with the new vaule?)
Thank you