Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Centos / Apache Web Server Question

    Hi, im not a complete newbie, but I am a bit new to setting up websites on linux. I have setup OTRS, a company ticketing system and all works fine on the private network.

    I have to now get this website reachable from the internet, for clients to start using. The server it is on is not a web server specifically, its a utility server of sorts, hosting a few internal websites amongst other services for private network use.

    I have setup a virtual interface (eth0:1) with a separate IP address specifically for the OTRS website (not sure if this is even necessary), and this I have NAT on the firewall with its own public IP. Ive opened http for this IP so that the website is reachable form the internet, by simply using the public IP with /otrs/login.php. (I can sort DNS out later for this)

    The problem im having is if I just put in the IP with "/" into the web browser, it of course shows the entire contents of the /var/www folder, which I dont want, obviously. I've of course removed the NAT for the moment while I figure out.

    How do I limit what is reachable on this server? how do I limit it to just the website I want reachable? I have got private websites like our company Wiki which I dont want to be reachable from the Internet.


  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    You can specify access to different websites with Apache by using the <Directory ...> configuration block. You can give access to different systems by the connecting party's IP address or domain name. There are examples in the standard httpd.conf file that comes with the vanilla Apache install.

    You can also provide different configurations for different sections of the web site - you can even give each of them a different name. Do some investigation of Apache Virtual Hosts, the subject is a little big to try and explain in one post on here. There are good documentation on this on the Apache web site and on the CentOS web site.
    Linux user #126863 - see

  3. #3
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    For your situation it may be cleaner to run a separate instance of Apache for OTRS, putting the config files under /etc/httpd.otrs and the web site under /var/www.otrs. Set the primary instance to listen only on eth0 and the OTRS instance to listen on eth0:1. You'll need to set up the startup for the second instance in some fashion. We do it in rc.local, running three reverse Apache proxies on one DMZ server, with each proxying to a different internal Oracle J2EE instance. It isolates the instance configurations from each other, and lends itself to readily shutting down development and test instances if production is taking a spike in hits in our case.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts