Javier
Javier

Reputation: 393

Before update to High Sierra httpd-vhosts.conf is empty

I just upgraded from Sierra to High Sierra.

Apparently everything works fine. But when testing my works in local (Web developments in PHP, etc) I see that none works.

Checking and looking for where the bug might be, I went to see that all my Virtual-Hosts were fine, and I find that the Virtual-host file, which had more than 10 configured elements, there is only 2 virtual-host of tests

The content of the virtual-host file after updating is:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/usr/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"
    CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/usr/docs/dummy-host2.example.com"
    ServerName dummy-host2.example.com
    ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
    CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
</VirtualHost>

My VirtualHost file is: /etc/apache2/extra/httpd-vhosts.conf

Can I recover that content in some way? Have I definitely lost those Virtual-host configurations?

Upvotes: 2

Views: 315

Answers (1)

misterwolf
misterwolf

Reputation: 424

I don't know if this my message should be a comment or an answer.

I experienced the same issue but fortunately the update preserves your files.

I found my last httpd vhosts in:

httpd-vhosts.conf~previous

I'd suggest to take a look at

/etc/apache2/

folder too, maybe your previous

httpd.conf 

is backup-ed under "~previous" naming, you can restore it or change the current.

Run:

sudo apachectl --test

to check if all is ok.

Upvotes: 5

Related Questions