The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

upload files to root directory?

Discussion in 'General Discussion' started by baidarkabob, Sep 9, 2003.

  1. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    Pardon my ignorance but how do i upload files to the root /public_html directory? I have tried connection via FTP but no go.

    Bob

    cPanel.net Support Ticket Number:
     
  2. cretu

    cretu Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    208
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    If you are using such FTP clients as CuteFTP Pro, choose "SFTP using SSH2" type of connection (port 22). Login with your Root's password.

    You will land in /root/ from where you can navigate easly to /public_html/

    Let me know if this worked for you

    Cretu

    cPanel.net Support Ticket Number:
     
  3. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    cretu, that worked perfectly. Thank you.

    Here is another question. I thought if i uploaded an index.html page into /root/public_html it would show up when the server name was entered into a browser address bar, but instead the first virtual host loads. Why is that? Do i need to add my server name as an account?

    Can a browser be pointed to html pages in the root directory?

    Thanks,
    bob

    cPanel.net Support Ticket Number:
     
  4. cretu

    cretu Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    208
    Likes Received:
    0
    Trophy Points:
    16
    bob,

    Location you are looking for is:

    /usr/local/apache/htdocs

    Cretu

    cPanel.net Support Ticket Number:
     
  5. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    Sorry cretu, I am not getting it. Are you suggesting that i place an index.html document in /usr/local/apache/htdocs and that will show up when the IP address for this server is typed in the address bar, or are you suggesting that I read the manual:confused: /usr/local/apache/htdocs/manual

    b

    cPanel.net Support Ticket Number:
     
  6. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    No, if you'll go to /usr/local/apache/conf/httpd.conf you'll find that the virtual directory is
    /usr/local/apache/htdocs/

    If you place an index file there it will show up. Otherwise, you could go into httpd.conf and change the path there.

    cPanel.net Support Ticket Number:
     
  7. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    thanks casey

    I thought I gave that a try yesterday Casey. I will double check but it did not seem to work.

    Maybe i am typing in the address incorrectly? http://mymainIP?

    Thanks for your help.

    bob

    cPanel.net Support Ticket Number:
     
  8. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    Casey, cretu, I put an index.html file in /usr/local/apache/htdocs/ but the main IP is still jumping to the first VH in the list. I opened /usr/local/apache/conf/httpd.conf and did a search for all instances of /usr/local/apache/htdocs/ but only found two and they were associated with access to the manual. Where in the conf file should the virtual directory line be that points to /usr/local/apache/htdocs/?

    Thanks again,

    bob

    cPanel.net Support Ticket Number:
     
  9. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    You may need to add a virtual directive just before the first VH. Like so

    <VirtualHost MainIP>
    BytesLog domlogs/servername.domain-bytes_log
    ServerName servername.domain
    ServerAlias servername.domain
    DocumentRoot /usr/local/apache/htdocs
    </VirtualHost>

    Then it will work.

    cPanel.net Support Ticket Number:
     
  10. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    Thanks dgbaker,

    I will give that a try. Should i replace ServerName with my server name, or just leave those lines alone?

    bob

    cPanel.net Support Ticket Number:
     
  11. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    OK, taking from what the other virtual hosts look like, I added this right before the first VH in the list.

    <VirtualHost 66.129.86.150>
    BytesLog domlogs/camulod.flying-squirrel.org-bytes_log
    ServerName www.camulod.flying-squirrel.org
    ServerAlias camulod.flying-squirrel.org
    DocumentRoot /usr/local/apache/htdocs

    </VirtualHost>

    Still no luck. What am i missing?

    Thanks,
    bob

    cPanel.net Support Ticket Number:
     
  12. baidarkabob

    baidarkabob Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Alaska
    I am missing the ole' restart the server...

    Working now.

    Now I am wondering if Cpanel is installed at the root level? Or is there another way that i can create a Mysql db here?

    Thanks again.

    bob

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page