• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

a2dissite Command Examples in Linux

by admin

a2dissite is a command-line utility that is part of the Apache HTTP Server on Linux systems. It is used to disable an Apache virtual host, which is a configuration that defines a group of settings that control how the Apache HTTP Server serves a specific website or group of websites.

To use a2dissite, you must pass it the name of the virtual host configuration file you want to disable. For example, to disable a virtual host with a configuration file named example.conf, you would run the following command:

$ sudo a2dissite example.conf

After running this command, the Apache HTTP Server will no longer serve the website or websites defined in the example.conf configuration file. To re-enable the virtual host, you can use the a2ensite command, which enables a virtual host that has been previously disabled using a2dissite.

It’s important to note that a2dissite and a2ensite only affect the availability of the virtual host. They do not delete or modify the virtual host configuration file itself. To permanently delete a virtual host, you will need to delete the configuration file and any associated files or directories.

a2dissite Command Examples

1. Disable a virtual host:

$ sudo a2dissite {{virtual_host}}

2. Don’t show informative messages:

$ sudo a2dissite --quiet {{virtual_host}}

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to rotate /var/log/wtmp and /var/log/btmp file using logrotate
  2. Linux OS Service ‘scsi_reserve’
  3. How to disable avahi-daemon service in CentOS/RHEL
  4. How to Create yum Repository in CentOS/RHEL
  5. How to Configure firewalld Logging in CentOS/RHEL 8
  6. How to block a specific IP Connecting to a server with firewall-cmd
  7. cpufreq-set Command Examples in Linux
  8. firewall-offline-cmd Command Examples in Linux
  9. sftp Command Examples in Linux
  10. killall Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright