After re-installing Lion Server on several occasions and still unable to get wiki and profile manager working I have manage to solve it.
1. Delete Server folder in Library/Server
2. Delete Server from Applications
3. Restart Mac
4. Open Disk Utility
5. Select your boot drive where Server is installed on the left pane
6. Under First Aid on right pane select Verify Disk Permissions
7. Select Repair Disk Permissions
8. Re-install Server application
Solved issues for me
I've had the same issue where profile manager was not reading the settings. I ran the following script: /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/backend/wipeDB. sh
When i went back into the server app and tried to enable device management, it's telling me "This computer is already a network directory server" and i can't continue.
Not sure what to do.
This problem is fixed for me after couple days of frustration.
The final things that fixed were the following
1) create a .bash_profile if it doesnt exist already in your ~/ folder (home folder)
save and reload by typing ". .bash_profile"
2) in this edit to add the following command
3) Initialize postgres with
sudo -u _postgres /usr/bin/pg_ctl initdb -D /var/pgsql
4) sudo chown _postgres:_postgres /Library/Logs/PostgreSQL
5) Initialise all databases
run all the scripts found
especially for the profile manager error that I was getting, the devicemgr_db did not exist in the right location. So running create_devicemgr_db.sh fixed it. Some of you may have issues with CalDAV or Webmail or CoreCollaboration. This solution will fix all of them, I believe.