1

I have RedHat 8 server with Apache/2.4.37 running on it and we're hosting 4 vhost simple websites. I'd like to disable 2 of those 4 website while keep the other websites running.

I tried many things but nothing works really.. If i shutdown httpd service, of course will take all 4 websites down. I cannot find this command "a2dissite" anywhere on my system (I guess due to the old Apache version i have) Any help would be greatly appreciated

1
  • 2
    This question is similar to: How to a2ensite and a2dissite on Red Hat?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Commented Nov 23 at 6:07

3 Answers 3

0

On RHEL8 check /etc/httpd/conf.d/ for .conf files, that contain the config for the two websites. Rename the files for the sites you want to disable and reload the apache service.

1
  • I tried to rename those ".conf" files & restarted httpd but i'm still able to access the sites
    – Katkota
    Commented Nov 26 at 2:32
0

I think i was able to disable the specific website by editing httpd.conf and use the following:

IncludeOptional conf.d/vhosts/websitename.conf
-2

The a2dissite and a2ensite commands just change your /etc/apache2/sites-enabled directory.

Delete the symlinks in /etc/apache2/sites-enabled for the vhosts you want to disable and restart Apache.

To recover, create symlinks from the vhost configuration files in /etc/apache2/sites-available to /etc/apache2/sites-enabled and restart.

3
  • 2
    This doesn't work on Red Hat. Commented Nov 23 at 12:19
  • 1
    I don't have these 2 commands .. i don't even have '/etc/apache2' directory
    – Katkota
    Commented Nov 23 at 15:56
  • 1
    How about /etc/httpd? Commented Nov 24 at 18:04

Not the answer you're looking for? Browse other questions tagged .