To change several settings:

$ sudo serveradmin settings

web:setting = value

web:setting = value

web:setting = value

[...]

Control-D

Web serveradmin Commands

You can use the following commands with the serveradmin application to manage Web service.

Command

 

(web:command=)

Description

getHistory

View Web service statistics. See “Viewing Service Statistics” on

 

page 126.

 

 

getLogPaths

Finding the access and error logs for each hosted site. See “Viewing

 

Service Logs” on this page.

 

 

getSites

Listing existing sites. See “Listing Hosted Sites” on this page.

 

 

Listing Hosted Sites

You can use the serveradmin getSites command to display a list of the sites hosted by the server along with basic settings and status.

To list sites:

$ sudo serveradmin command web:command = getSites

Viewing Service Logs

You can use tail or any other file listing tool to view the contents of Web service access and error logs for each site hosted by the server.

To view the latest entries in a log:

$ tail log-file

You can use the serveradmin getLogPaths command to see where the current error and activity logs for each site are located.

To display the log paths:

$ sudo serveradmin command web:command = getLogPaths

Chapter 12 Working With Web Technologies

125

Page 125
Image 125
Apple oxs manual Web serveradmin Commands, Listing Hosted Sites, Viewing Service Logs, To list sites