1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Setup folder and access via browser (webserver directory)

Discussion in 'Plesk for Linux - 8.x and Older' started by dstanley, Jul 14, 2005.

  1. dstanley

    dstanley Guest

    0
     
    Is it possible to just make folders on the server and add files to it and type in http://serverIP/folder

    and access this?

    Or how would one go about setting the ability to do this?

    Plesk preview isn't great for setting up sites with no IP address and showing them up without DNS
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Yes, of course you can. As long as you create the /foldername under the docroot of the domainname which is set as the default for the IP address.

    To clarify:

    If you have set the default domain for 'IPAddress' as 'yourmaindomain.com', then you can create a folder such as:

    /home/httpd/vhosts/yourmaindomain.com/httpdocs/test

    and put files into it.

    Then immediately you should be able to browse to:

    http://IPAddress/test/filename.ext

    and be able to access the file(s).

    If you put an index file into the directory, then apache should serve that file up by default if you don't put a filename in the URL.
     
  3. dstanley

    dstanley Guest

    0
     
    is there a way i can setup a domain on a server but not have the domain pointing to the server but view it as IPaddress/site

    Kind of like the site preview (but thats ****)

    ?
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    As long as you set a default domain for the IP address (in Server - IP Addresses - Hosting column - click on the zero on the IP address line - pick a domain - click on Set as Default).

    Once this is done, you can then create /folders under that domain's docroot. In each folder, put an index file (.html or .php)

    Then they can be browsed by IPaddress/site and apache will then bring up the index file by default.

    The reason you have to associate a domain with the IP eventhough you will not be using it to browse, is so that the server knows what local path to find the /folders at.

    There is no /home/httpd/vhosts/IPAddress/httpdocs folder, so you have to associate the IP with a domain which exists.

    The people browsing by the IP/folder will not know what domain it is under.
     
  5. dstanley

    dstanley Guest

    0
     
    Hi,

    Thanks for that and i understand that.

    I was wondering however was there maybe variation of that so i could setup sites "in production" before having the domain point to the server and be fully able to use mysql etc and then when all the work is done, point the domain to the server...
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    The easy way to do it is to setup the domain as it normally would be in Plesk, then set your workstation's primary DNS server (like under Windows, Network Properties, TCPIP properties, Primary DNS server, use your Plesk server's IP).

    Then the workstation when doing a DNS lookup on the domain name, will query your Plesk server (before any other name server) and of course your Plesk server will give it the proper IP (pointed to your Plesk server).

    I do this all the time instead of using the Site Preview function.

    This is a *lot* cleaner than setting it all up with temporary settings, then changing things in Plesk to go 'live'.
     
  7. dstanley

    dstanley Guest

    0
     
    neat little trick, will try it out later :)
     
Loading...