I have a file like this
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
I would like to achieve this:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
I tired this but the line carriage doesn't work properly. I even tried \r\n without luck.
sudo sed -i "s/webmaster@localhost/[email protected]\rServerName domain.com \rServerAlias www.domain.com/" /etc/apache2/sites-available/domain
I get this weird character there between:
<VirtualHost _default_:443>
ServerAdmin [email protected] ^MServerName domain.com ^MServerAlias www.domain.com
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
What am I missing?
Many Thanks,