Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apache2: /etc/apache2/sites-available is missing on macos

Tags:

apache

django

I am trying to configure apache2 so that it communicates with django and I am unable to the 'sites-available' directory where I believe a 'defaults' directory should reside. The following is my file structure under the 'etc/apache2/' directory:

├── extra
│   ├── httpd-autoindex.conf
│   ├── httpd-dav.conf
│   ├── httpd-default.conf
│   ├── httpd-info.conf
│   ├── httpd-languages.conf
│   ├── httpd-manual.conf
│   ├── httpd-mpm.conf
│   ├── httpd-multilang-errordoc.conf
│   ├── httpd-ssl.conf
│   ├── httpd-userdir.conf
│   ├── httpd-vhosts.conf
│   └── proxy-html.conf
├── httpd.conf
├── httpd.conf.bak
├── httpd.conf.pre-update
├── magic
├── mime.types
├── original
│   ├── extra
│   │   ├── httpd-autoindex.conf
│   │   ├── httpd-dav.conf
│   │   ├── httpd-default.conf
│   │   ├── httpd-info.conf
│   │   ├── httpd-languages.conf
│   │   ├── httpd-manual.conf
│   │   ├── httpd-mpm.conf
│   │   ├── httpd-multilang-errordoc.conf
│   │   ├── httpd-ssl.conf
│   │   ├── httpd-userdir.conf
│   │   ├── httpd-vhosts.conf
│   │   └── proxy-html.conf
│   └── httpd.conf
├── other
│   └── php5.conf
└── users
    ├── Guest.conf
    ├── aphexlog.conf
    └── secops.conf

If anyone knows if there is a possibility of a alternative config file with the same properties or some other solution... maybe I am just being dumb but everything that I have found online indicates that I should have this properties file.

Any and all help is appreciated :)

like image 412
aphexlog Avatar asked Oct 12 '25 10:10

aphexlog


1 Answers

sites-available is a concept from Debian-derived distributions of Linux. MacOS does not have it, and neither do most other Linux flavours.

Instead you need to put your configuration directly in httpd.conf.

(Note, it's unusual to run a production system on a Mac; if you're just doing this for development, you can use the built-in runserver rather than messing around with Apache.)

like image 61
Daniel Roseman Avatar answered Oct 16 '25 07:10

Daniel Roseman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!