title: In joomla instead of Domain Name, IP address shows in address bar(URL rewrite rules)!
body: <p>At our college we have implemented our website and hosting it on our own servers. The server is Apache and OS is Ubuntu. My colleague posed me this query. He says the httpd.conf file has to be edited for rewriting domain name.
  Our website is This-> <a href="http://cityengineeringcollege.ac.in" rel="nofollow">http://cityengineeringcollege.ac.in</a>
  What should be there in that file to display correct domain name. In joomla global configuration even though we chose to use URL rewriting in SEO settings the URL is not being rewritten. We are directing web page requests from 202.62.95.50 to 202.62.95.51.
  P.S
  The .htaccess file has following rewrite section</p>
  
  <pre><code>RewriteBase /city
  
  ## Begin - Joomla! core SEF Section.
  #
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  #
  # If the requested path and file is not /index.php and the request
  # has not already been internally rewritten to the index.php script
  RewriteCond %{REQUEST_URI} !^/index\.php
  # and the request is for something within the component folder,
  # or for the site root, or for an extensionless URL, or the
  # requested URL ends with one of the listed extensions
  RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
  # and the requested path and file doesn't directly match a physical file
  RewriteCond %{REQUEST_FILENAME} !-f
  # and the requested path and file doesn't directly match a physical folder
  RewriteCond %{REQUEST_FILENAME} !-d
  # internally rewrite the request to the index.php script
  RewriteRule .* index.php [L]
  #
  </code></pre>
  
  <p>The config file /etc/apache2/httpd.conf has the following code</p>
  
  <pre><code>&lt;VirtualHost *&gt;
  ServerName www.cityengineeringcollege.ac.in
  DocumentRoot /var/www
  ....
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>My Question is is the document root correct like i think it should be /var/www/city and The file /etc/hosts has( as its first line)</p>
  
  <pre><code>127.0.0.1  localhost
  </code></pre>
  
  <p>which i think should have the server name as an alias like</p>
  
  <pre><code>127.0.0.1 localhost cityengineeringcollege.ac.in
  cityengineeringcollege.ac.in localhost
  </code></pre>
  
  <p>Is this correct? The thing is i am eager to set the things right and we can work on this only during office hours(9-5). We have tried out a variety of things like searching for ServerName in /etc/apache2 folder using grep and inserting the line</p>
  
  <pre><code>ServerName www.cityengineeringcollege.ac.in
  </code></pre>
  
  <p>everywhere it is found. Is www required there? We have a file called city inside sites_available which is a clone of the file 000-default and that file is linked with sites_enabled using </p>
  
  <pre><code>sudo a2ensite city
  </code></pre>