Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #360592
    hetjan
    Participant

    I’ve done a search in Apple’s documentation, on their website and here but cannot find an answer to the question: What does the Aliases tab in the Web part of Server Admin do?

    Can you give examples?

    #360627
    hetjan
    Participant

    Maybe I should have worded the question like this:
    How does the Aliases tab in the Web part of Server Admin work?

    #360665
    Dan Dickinson
    Participant

    It’s essentially letting you map a pattern the web server receives to somewhere else on the disk. Taking this [url=http://httpd.apache.org/docs/urlmapping.html#outside]from the Apache manual[/url]:

    [quote]
    Alternatively, the Alias directive will map any part of the filesystem into the web space. For example, with:

    Alias /docs /var/web

    the URL http://www.example.com/docs/dir/file.html will be served from /var/web/dir/file.html. The ScriptAlias directive works the same way, with the additional effect that all content located at the target path is treated as CGI scripts.

    For situations where you require additional flexibility, you can use the AliasMatch and ScriptAliasMatch directives to do powerful regular-expression based matching and substitution. For example,

    ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2

    will map a request to http://example.com/~user/cgi-bin/script.cgi to the path /home/user/cgi-bin/script.cgi and will treat the resulting file as a CGI script.[/quote]

    The GUI that Apple gives you is pretty simple; “pattern” is the first argument for the Alias/ScriptAlias directives, “path” is the second.

    The thing Josh is referring to is in fact the VirtualHost functionality, which is covered by Apple’s “Sites” tab, which I think we’re all familiar with.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Comments are closed