how to delete or reset mac os x lion server

how delete or reset my mac os x lion server? My first domain file is under /var/empty and i cant delete it, it wont let me. And when i try to go to my website it says failed to open page. Someone please help me im new to servers and stuff like that. I have my dns setup already with dyndns and i have a wndr 3300 netgear router and it wont let me port foward my ip because it says i can only use a LAN IP adress but the router setup page also has a dyndns setup page and i set it up correctly.

MacBook Pro, Mac OS X (10.7)

Posted on Jul 22, 2011 11:05 AM

Reply
28 replies

Jul 27, 2011 6:24 AM in response to l3g3ndary

Any update here? i messed up the configuration too....i have mac mini with snow leopard server installed initially...works fine...but when i loaded up lion server....upgrade failed, but was able to restart and booted up...but then things didn't work well anymore....calendar was not working, webmail doesnt work right, the wiki server does not work too....please provide updates to this

Jul 31, 2011 2:44 AM in response to l3g3ndary

I had similar problem.


I need following.


1. Turn off all services under Server app.

2. Under Hardware, settings, change SSL certificate to "none"

3. Under Hardware, network, reset host name again.

4. Under Hardware, settings, change SSL certificate back to correct one

5. Turn Web service ON.


It may still say /var/empty.


6. Turn Wiki service ON

7. Recheck Web service. It should be changed to /Library/Server/Web/Data/Sites/Default.


Hope this helps.

Aug 3, 2011 2:00 PM in response to akbdeck

Try this, it worked for me.


In Terminal.app:


cd /etc/apache2/sites

sudo -s # become admin--you will have to enter your password here

rm 0000_any_443_.conf

cp 0000_any_80_.conf.default 0000_any_80_.conf

cp virtual_host_global.conf.default virtual_host_global.conf

exit # go back to being a normal user


Then go back to Server.app and restart your services.

Aug 4, 2011 11:18 PM in response to l3g3ndary

First off, if you've been mucking around with the config files, their permissions are probably out of whack. And just for good measure it's a good idea to fix the permissions before going any further. From the Terminal or an SSH session, run:

sudo diskutil repairPermissions /



Next, according to the Lion Server: Advanced Administration Manual, you reset the web settings with:

sudo serveradmin command web:command=restoreFactorySettings


Note that it's very important for you to have left the various ".default" files intact in the

/etc/apache2/sites/
directory. It will take more extensive help if you moved or deleted those files before running these previous commands.


That should do the trick and reset the Web service to factory settings. That said, I've reset my web server back to the defaults several times and I'm still seeing the

/var/empty
problem creep up after I add additional sites. The tool appears to be broken, and I'm hoping that Server 10.7.1 will fix some of these issues.

Aug 12, 2011 4:11 PM in response to Michael Lake

Turns out this whole "/var/empty" business is due to a bad default configuration for Apache Virtual Hosts on Apple's part. To fix it:

$ sudo nano /etc/apache2/sites/00000_EnableVirtualHosts.conf


Type the following onto the first line:

NameVirtualHost *:80


Hit ctrl-O to save, then ctrl-X to close. And then reload the apache configuration with:

$ sudo apachectl graceful


Apple may (and should) fix this problem in a future 10.7 update. If they do, just remove the "00000_EnableVirtualHosts.conf" file and reload Apache again with the last command.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to delete or reset mac os x lion server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.