hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : Editing .htaccess in root with cpanel
Reply

Forum Jump

Editing .htaccess in root with cpanel

Reply Post New Thread In Hosting Software and Control Panels Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Aspiring Evangelist
 
Join Date: May 2007
Posts: 438

Editing .htaccess in root with cpanel


At present I load all of my sites to my server via WHM -> List accounts / create

Nothing resides in "root" (If you type my serverip, nothing shows)
How can I add a .htaccess file to this? I went in via sftp earlier and uploaded a robots.txt for test, went to but it still gave a 404 header.

I disconnected ftp & went back, the file was still there. Not sure why it was passing a 404. Do I have to run a special command in ssh to say "hey there's new files here"?



Sponsored Links
  #2  
Old
Aspiring Evangelist
 
Join Date: Jan 2008
Location: United Kingdom
Posts: 408
When you say root, Do you mean apaches document root when you view an IP bound to your server?.
If so, you need to add the files to /usr/local/apache/htdocs/

  #3  
Old
Aspiring Evangelist
 
Join Date: May 2007
Posts: 438
That was it, now I can add files.

I cannot seem to get a .htaccess to work though. They work in all of the other domains, but not htdocs.

Sponsored Links
  #4  
Old
Web Hosting Evangelist
 
Join Date: Jun 2006
Location: Chicago
Posts: 462
Quote:
Originally Posted by gpl24 View Post
That was it, now I can add files.

I cannot seem to get a .htaccess to work though. They work in all of the other domains, but not htdocs.
Did you create the file via ssh? Run the following to be sure ownership/permissions look alright:

// This will give you a quick glance of the file. Paste it here.
ls -la | grep .htaccess

// Let's reset the permission on the .htaccess file
chmod 644 .htaccess

If changing permission on the file does not work, paste your httpd.conf here, along with the output of the above command. It's likely an ownership issue in that case....

__________________
www.cologlobal.com

  #5  
Old
Junior Guru Wannabe
 
Join Date: Aug 2004
Location: Tampa, Fl
Posts: 51
You may have to modify your "options" statement in /usr/local/apache/conf/httpd.conf, if it looks like this:

Code:
<Directory "/usr/local/apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
Probably change the "AllowOverride None" to "AllowOverride All" or something

Reply

Related posts from TheWhir.com
Title Type Date Posted
GoDaddy Supports cPanel as Part of Web Hosting Updates Web Hosting News 2014-05-09 12:40:20
cPanel Addresses User Concerns of Transfer and Backup Restore System Security Web Hosting News 2013-05-24 10:13:44
cPanel & WHM Software 11.36 Reaches Stable Tier Status Web Hosting News 2013-04-09 11:44:33
SSHD Rootkit in the Wild Blog 2013-02-22 16:44:08
cPanel Security Updates Address Perl Module Vulnerabilities Web Hosting News 2012-12-06 12:55:54


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?