![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,677
|
Quote:
.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 .... |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,677
|
Quote:
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 .... |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Quote:
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. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
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 .... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
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
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Quote:
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 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Industry Role:
Join Date: May 2005
Location: Chicago
Posts: 386
|
In your /usr/local/apache/htdocs, change the index.html.en
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
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
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Quote:
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. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |