How can I point all incoming requests to one directory

Discussion in 'Apache' started by ryy705, Apr 21, 2011.

  1. #1
    Hello,
    I have setup Ubuntu 10, Apache 2 and PHP5 setup on a server. I intend to run a single PHP application on it. I would like all domains pointing to this server to point to my application's web root. How can I set this up?

    I have set Document Root in /etc/apache2/sites-available/default to my application. I pointed my first domain about two weeks ago and it worked. But now no other domains are pointing to my application. It goes to a page that says "It Works!".

    I know this can be done because I have seen it working on a CentOS system. No server configuration was necessary for new sites. All sites simply pointed to the same directory.

    Please help, how can point all incoming requests to the same directory?
     
    ryy705, Apr 21, 2011 IP
  2. buccu

    buccu Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    For our installation requires an Internet connection. Installation at the start of Apache, PHP, MySQL and the last is PHPMyAdmin.

    after completion of installation, directly in the run Apache2 by default by ubuntu. To test if apache is already running, please open http://localhost

    If the display that appears is the inscription "It's Work" then the installation was successful.
     
    buccu, Apr 21, 2011 IP
  3. lkraj

    lkraj Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #3
    Try using ServerAlias directive
     
    lkraj, Apr 21, 2011 IP
  4. ryy705

    ryy705 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    @Ikraj: Where do I apply the Server Alias directive? The apach2.conf file or the default file? Please give me an example. I am programmer, I have zero experience in server management.
     
    ryy705, Apr 22, 2011 IP