Results 1 to 5 of 5
Hybrid View
-
08-01-2008, 12:18 AM #1Aspiring Evangelist
- Join Date
- May 2007
- Posts
- 442
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"?
-
08-01-2008, 08:25 AM #2Aspiring Evangelist
- Join Date
- Jan 2008
- Location
- United Kingdom
- Posts
- 414
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/
-
08-02-2008, 10:18 PM #3Aspiring Evangelist
- Join Date
- May 2007
- Posts
- 442
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.
-
08-03-2008, 02:35 PM #4Web Hosting Evangelist
- Join Date
- Jun 2006
- Location
- Chicago
- Posts
- 462
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....
-
08-03-2008, 04:04 PM #5Junior 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>
Web1Host featuring high bandwidth virtual and dedicated hosting since '98
1stDomainReseller.com Turn-Key Domain Reseller Solution
"All those who believe in psychokinesis ... raise my hand"