0

I was trying to change my old domain to a new domain, but I deleted some of the configurations inside /etc/apache2 by accident.

Now I can't load the main page (on WordPress) but I am still able to load the forum page (Flarum.) Is there any way I can fix this problem without reinstalling Apache? My website is being hosted by Digital Ocean.

1

Yes, that's perfectly fine. The sites-enabled configuration files are just a symbolic link to the files in sites-available dir. Make sure the vhost configuration files have the dot conf extension. Newer Apache server software versions are picky about that. They will simply ignore the non dot conf vhosts file, and not really ring an alarm bell for you in the log files. (I noticed this first as a difference between Debian Wheezy and Debian Jessie apache2 configurations). You can decide to use the a2ensite command, or create the symbolic link yourself. For example :

sudo nano /etc/apache2/sites-available/mywebsite.conf

sudo a2ensite mywebsite

sudo apache2 reload

Or :

sudo nano /etc/apache2/sites-available/mywebsite.conf

sudo ln -s /etc/apache2/sites-available/mywebsite.conf /etc/apache2/sites-enabled/mywebsite.conf

sudo apache2 reload

Make sure to clean up possibly broken symbolic links in the /etc/apache2/sites-enabled/ directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.