In /etc/apache2/sites-available, my file 000-default.conf looks like this
` <VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName exemple2.domain.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
`
When I type exemple2.domain.com, I get the default Apache page and the exemple2.domain.com url doesn’t change.
However, if I add this line
DocumentRoot /var/www/html/wordpress/
I get the page I want, but the url changes from exemple2.domain.com to exemple1.domain.com (wordpress page).
What I want is for the url not to change while displaying the content of my worpress page.
If I add this
Redirect 301 / http://exemple2.domain.com
I get too many redirection error
Note that I’ve set up a cname from exemple2.domain.com to exemple1.domain.com (at my provider) and I have a VPS
Thanks
In /etc/apache2/sites-available, my file 000-default.conf looks like this
` <VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName exemple2.domain.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
`
MPL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.