Allow access to Alfresco server only by name and not IP address

You many want to block access to your web server using IP address. Here's how to accomplish that:

Navigate to tomcat/webapps/share/WEB-INF

cd tomcat/webapps/share/WEB-INF

you should see the file web.xml and urlrewrite.xml, open the file

sudo vi web.xml

add the following before </web-app>:











now open urlrewrite.xml

sudo vi urlrewrite.xml

Paste the following under the <urlrewrite use-query-string="true"> line


    <name>Canonical Hostnames</name>

    <condition name="host" operator="notequal">^</condition>

    <condition name="host" operator="notequal">^$</condition>


    <to type="redirect" last="true"></to>


Save the files and restart the server and you have locked the server to domain name