Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-16-2005, 07:14 PM   #1
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
cpanel server question

I want to do the following for my cpanel powered linux server and was wondering the locations of the files to edit / add.

1. Edit the default .htaccess file for newly created accounts
2. Edit the default page that comes up when a domains nameservers are pointing to the server but that account has not been added from web host manager.
3. Add/Edit the default .htaccess file for #2

If this is all in the same directory that is fine.

Hope someone can help.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 07:28 PM   #2
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,677
Quote:
Originally Posted by mkx
I want to do the following for my cpanel powered linux server and was wondering the locations of the files to edit / add.

1. Edit the default .htaccess file for newly created accounts
2. Edit the default page that comes up when a domains nameservers are pointing to the server but that account has not been added from web host manager.
3. Add/Edit the default .htaccess file for #2

If this is all in the same directory that is fine.

Hope someone can help.
1. .htaccess ... more like the config file, no ?

.htaccess file for accounts are in the root of the account, and most of the time only there to indicate with file to open first ( html, htm, php, etc..) and to prevent index.

More details, people could help you more.
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....
directfiesta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 07:33 PM   #3
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Thanks for the reply, I need to add document reroutes to the htaccess file so that if someone types in www.mydomain.com/asdjflasdjfladsjflasdjf it will redirect to www.mydomain.com which is the reason I need to find the right .htaccess to edit. There is already a default one added for each newly hosted account, i just need to know the directory it is in so I can edit it. This avoids time wasted by adding the same .htaccess file manually to each new account.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 07:39 PM   #4
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,677
Quote:
Originally Posted by mkx
Thanks for the reply, I need to add document reroutes to the htaccess file so that if someone types in www.mydomain.com/asdjflasdjfladsjflasdjf it will redirect to www.mydomain.com which is the reason I need to find the right .htaccess to edit. There is already a default one added for each newly hosted account, i just need to know the directory it is in so I can edit it. This avoids time wasted by adding the same .htaccess file manually to each new account.
an ;htacces file controls the folder it is in and ALL folders below it.

Now, www.mydomain.com/asdjflasdjfladsjflasdjf , does that really exist?

If it is the only file that you want to redirect, use a simple java sript . If you have many of different name, then you would need to use the mod-rewrite.

You would then say to redirect ALL pages to www.mydomain.com , EXCEPT the actual page that you do not want redirected.

If you only have a few pages, then in mod_rewrite, you would list those pages with the rewrite instructions.

That .htaccess file would be in the " public_html " or " www" folder. To see it with an ftp program, make sure that preferfences allows to show " hidden files ".


EDIT; You also want to edit the " main " file so that when you create a new account it is done the same way ... Not sure about that, maybe with wildcards ( * )
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....

Last edited by directfiesta; 10-16-2005 at 07:42 PM..
directfiesta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 07:42 PM   #5
broke
Confirmed User
 
Join Date: Aug 2003
Location: Someplace Windy
Posts: 4,501
I think he's talking setting up an .htaccess template that cpanel will use as the default for all new accounts. I also don't think that cpanel uses a template to create the htaccess files.
__________________
Perfect Gonzo
broke is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 07:45 PM   #6
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
I need to redirect non existant pages, error pages, etc by adding the following to .htaccess:

ErrorDocument 400 /
ErrorDocument 401 /
ErrorDocument 403 /
ErrorDocument 404 /
ErrorDocument 500 /


That is not my concern. My concern is to find the default .htaccess file that gets added to each newly created account. I already know that it moves the default file into public_html or www but I need to edit the actual file that it is copying it from.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 07:48 PM   #7
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by broke
I think he's talking setting up an .htaccess template that cpanel will use as the default for all new accounts. I also don't think that cpanel uses a template to create the htaccess files.
That is correct. There is already a default file that gets added to each new account, I think this might have been from an xpanel install on the server, I need to find this file and edit it but I do not know where it is located and do not want to duck anything up. I was just curious if anyone knew the location this might be in.

Also I wanted to find and edit the page not hosted document that appears when you type in a domain name that is reflected to the servers nameservers but not created on the server to be hosted.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 08:01 PM   #8
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by mkx

2. Edit the default page that comes up when a domains nameservers are pointing to the server but that account has not been added from web host manager.
Found the file Still have not found the .htaccess files though
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 08:16 PM   #9
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,677
for the Cpanel file:

use chattr +i index.html to prevent any changes


otherwise it could get reset to default in the next update.
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....
directfiesta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 09:17 PM   #10
seattle
Registered User
 
Join Date: Aug 2005
Location: New Orleans
Posts: 175
login to the shell.
ls -la ~/www

You must login to the shell (linux command console?) as the user you have hosted the domains that you are messing with and do that command to see the files that are hidden or start with a '.'.
Login to your cpanel frontpage and you can do more.
Once you have done this, you can 1)"password protected directories"
or 2)manually make your own .htaccess files are both on the spash page for cpanel. browse around and get used to it

also, you can create your own customer error pages as you described above. Its under your login main screen. Not WHM (webhostmanager).
"custom error pages"
redirects are another issue. its best to setup your 404 to redirect back probably.
if you have any other cpanel issues, I am running a couple cpanel boxes right now.

Last edited by seattle; 10-16-2005 at 09:19 PM..
seattle is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 09:54 PM   #11
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
hmm that didn't work. there is already a default .htaccess file but I cannot seem to find it
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:00 PM   #12
broke
Confirmed User
 
Join Date: Aug 2003
Location: Someplace Windy
Posts: 4,501
I think if you create an .htaccess file in /root/cpanel3-skel/public_html that file will be used when a new account is created.
__________________
Perfect Gonzo
broke is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:02 PM   #13
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by broke
I think if you create an .htaccess file in /root/cpanel3-skel/public_html that file will be used when a new account is created.
that was the first thing i tried i think i will contact xpanel, maybe they added the default .htaccess file and ill try to find out where they put it
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:03 PM   #14
dubsix
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Posts: 363
the default .htaccess is contained within the skeleton directory in /root

editing anything in there will change the default file set or skeleton set deployed to all new sites created.

the same applies to reseller accounts, it will be in the skeleton directory under their main reseller account
dubsix is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:06 PM   #15
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
2. Edit the default page that comes up when a domains nameservers are pointing to the server but that account has not been added from web host manager.

instead of this, if anyone knows how to allow any domain name that has their name servers redirected to the server, to automatically go to the server not configured page instead of saying page not found.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:09 PM   #16
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by WireSix-Ryan
the default .htaccess is contained within the skeleton directory in /root

editing anything in there will change the default file set or skeleton set deployed to all new sites created.

the same applies to reseller accounts, it will be in the skeleton directory under their main reseller account
it must be getting over written by another .htaccess file as this is the one in /root/cpanel3-skel/public_html:

ErrorDocument 400 /
ErrorDocument 401 /
ErrorDocument 403 /
ErrorDocument 404 /
ErrorDocument 500 /


and this is the one showing up:
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.ajdfljadsfj.com
AuthUserFile /home/ajdfljad/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/ajdfljad/public_html/_vti_pvt/service.grp
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:19 PM   #17
VHNet
Confirmed User
 
Industry Role:
Join Date: May 2005
Location: Chicago
Posts: 386
In your /usr/local/apache/htdocs, change the index.html.en
__________________
Bringing mainstream marketing to the Adult Industry

ICQ: 221976033
VHNet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:23 PM   #18
VHNet
Confirmed User
 
Industry Role:
Join Date: May 2005
Location: Chicago
Posts: 386
Woops, not the .en, just the index.html. /usr/local/apache/htdocs/index.html
__________________
Bringing mainstream marketing to the Adult Industry

ICQ: 221976033
VHNet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:26 PM   #19
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by VHNet
In your /usr/local/apache/htdocs, change the index.html.en
i already edited that page but a page not found error still shows up for any domain name using the servers nameservers that hasn't been created.

In a nutshell, i want to be able to set up a default parking page for a bunch of domain names with out having to add them individually to the server, if I change the name servers over to the server and a default parking page is already there, that would make things very easy for me. An example would be sedo. When you change a domains name servers over to sedo's, there is automatically a parking page instead of a page not found.
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-16-2005, 10:27 PM   #20
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by VHNet
Woops, not the .en, just the index.html. /usr/local/apache/htdocs/index.html
did that one first, ;)
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.