cancel
Showing results for 
Search instead for 
Did you mean: 

Wordpress pointing to domain

hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Wordpress pointing to domain

Hi
I have installed wordpress on the cgi server following the instructions outlined
I would like to be able to install it against the domain. I repointed the domain to the cgi server but when I try to run the url
http://www.XXX.co.uk/wordpress/wp-admin/install.php I get a 404
The current domain has the following
xxx.co.uk a XX.XX.X.X
mx 20 mx.last.plus.net.
ccgi cname ccgi.plus.net.
Am I missing something
When I also try to run the permissions script I get the following
'Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: perms.cgi
If you think this is a server error, please contact the webmaster.
Error 500'
15 REPLIES 15
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Wordpress pointing to domain

Possible reasons for server 500 errors are mentioned in item 8 of the CGI Platform PHP Upgrade FAQ.
Are there any .htaccess files on your website, and if so what option settings do they include? Are the .htaccess file permissions 0640?
Did you upload the perms.cgi script as ASCII format and set its permissions to 0700? Are you accessing it using a ccgi.username.plus.com or domain URL?
David
hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Re: Wordpress pointing to domain

no .htaccess file tried to create one and it disappears when I upload
uploaded as ASCII and perms are 700
accessing using ccgi
I can install wordpress through CCGI but I want it to point to my domain so thought that the permissions might be the issue
hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Re: Wordpress pointing to domain

Can someone tell me which server the .htaccess should go onto ?
I'm new to all this stuff and would love to get me site up live
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Wordpress pointing to domain

For a website based on PHP applications (like WordPress) everything has to go on ccgi. That includes any .htaccess file intended to influence directory access on that site.
By default any .htaccess files are hidden, because their name begins with a dot/full-stop. By default your FTP program probably does not display hidden files - to see them you have to select an option like Force showing hidden files. With FileZilla that is the last option on the Server menu.
Have you checked where DNS points your www subdomain to? The settings you mentioned only have a CNAME entry for ccgi. What domain mapping have Plusnet created for you on ccgi?
David
hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Re: Wordpress pointing to domain

Thanks Sprankyt
I can now see the .htaccess file. 
and when I do a www.xxxx.co.uk I get a index of / page which is blank
my . htaccess looks like the following is this correct ?
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.xxxxxx\.co\.uk$ [nc]
RewriteCond %{REQUEST_URI} !^/~xxxxxx/wordpress/
RewriteRule . /index.php
How do I go about checking where DNS points my subdomain to? or what domain mapping plusnet have created on ccgi?
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Wordpress pointing to domain

It looks like you are getting a listing of your Homepages directory (which I assume is empty).
If it was the ccgi directory I would expect you to get a permission denied error if there is no index file.
What are you trying to achieve with the .htaccess file? Which folder is it in? I suspect it will do nothing since 'RewriteRule . xxx' needs at least one character present for the rule to be processed,
To check where DNS points do
nslookup www.xxxxxx.co.uk
and
nslookup ccgi.xxxxxx.co.uk
at a command prompt and check the Name, Address and Aliases entries returned.
David
hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Re: Wordpress pointing to domain

Yes you are correct the homepage directory would be blank
For the .htaccess file is in the cgi-bin folder.  i was looking to point the domain to the wordpress directory on the CCGI server.  Is it correct to do this ?
nslookup for domain is

canonical name = homepages.force9.net.
homepages.force9.net canonical name = hp.force9.net.
Name: hp.force9.net
Address: 212.159.9.90
Name: hp.force9.net
Address: 212.159.8.90

for the ccgi its
canonical name = ccgi.force9.net.
Name: ccgi.force9.net
Address: 84.92.1.5
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Wordpress pointing to domain

Those lookups show your www.domain points to Homepages. If you want this to point to ccgi you need to create a www CNAME entry similar to the one for ccgi you posted earlier. I think you will then need to raise a ticket to request the current www.xxxxxx.co.uk domain entry is moved to point to your ccgi webspace at ccgi.username.plus.com.
The ccgi.domain result seems to be OK.
Am I correct in assuming you have set up WordPress in /wordpress on the ccgi server? If so putting that .htaccess file in /cgi-bin means it will not affect files served from / or /wordpress
Now that you can see .htaccess files is there one in / which is where I assume you put the perms.cgi script?
If you create the following php_info.php file (just 3 lines)
[code=php_info.php]
<?php
phpinfo();
?>[/code]
upload it as ASCII to / and set its permissions to 700, than browse to it - does that give output?
David
hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Re: Wordpress pointing to domain

I have changed the DNS record to add the following,  will now raise a ticket

www cname homepages.force9.net.
There is currently no .htaccess file in / and yes wordpress is installed into /wordpress folder. I have just added the .htaccess file into that directory
the php_info.php script give the following output
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /share/storage/01/al/xxxxx/php_info.php on line 8
Parse error: syntax error, unexpected T_STRING in /share/storage/01/al/xxxxx/php_info.php on line 9
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Wordpress pointing to domain

Your www subdomain currently points to homepages so the DNS entry you posted will achieve nothing. I understood you wanted it to point to ccgi instead which requires an entry like you posted previously for your ccgi subdomain.
The php_info.php script posted contains only 3 lines and none of the characters are backslashes ( \ ). So the unexpected character and errors on line 8 and 9 infer the file has not been created properly. Did you create it in a plain text editor like Notepad - as you should - or was it a word processor such as Microsoft Word? The latter type of editor adds its own text formatting and the file will not work.
Did you create the .htaccess file using the same process?
David
hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Re: Wordpress pointing to domain

I thought Textedit was set up for plain but it was not, I re created the file and uploaded it
now get the php info page with the title 'PHP Version 5.2.6-1+lenny9'
also done the same for .htaccess
I have changed the DNS entry to the following, which I hope is correct
www cname ccgi.force9.net.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Wordpress pointing to domain

That looks better and the DNS CNAME entry for www is correct. You can check that this works (once the work requested on the ticket is complete) using the nslookup www.xxxxxx.co.uk command you used earlier. It should point to the ccgi server rather than homepages.
I think you now need to check that the perms.cgi script you created is plain text, then run that to set directory and executable file permissions correctly. Since php_info.php runs correctly the perms.cgi script should also do so.
Taking the 'one step at a time' approach I suggest you configure and install WordPress where it is currently located (in /wordpress) rather than trying to make the voodoo of mod_rewrite (via .htaccess) work alongside. The WordPress control panel will accept 'site location' changes after installation. Have you pre-configured the WordPress wp-config.php file or will you be letting the set-up process create that? If pre-configured it might need checking for text format. Also delete (or disable) the .htaccess file you put in /wordpress.
After installing WordPress, rather than using .htaccess to (effectively) relocate it to your ccgi root ( / ) I suggest adapting the procedure described in Giving WordPress its Own Directory to achieve this.
David
hootsman
Newbie
Posts: 9
Registered: ‎20-06-2011

Re: Wordpress pointing to domain

Hi
Things are looking pretty good now, i got the permission script to run and did the install, and followed the info in the link.  I have the site coming up on the ccgi url and the domainname/wordpress url.  if i just call my domain name i get
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
any ideas ?
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Wordpress pointing to domain

As the error message suggests, the 403 error probably results from there being no (WordPress) index.php file in your ccgi root.
An adaptation of the procedure listed in the Giving WordPress its Own Directory would have provided that. However now WordPress is set up and working in its subdirectory it is practical to reintroduce a .htaccess rewrite.
I suggest trying the following .htaccess in your ccgi root directory ( / 😞
(replace yourdomain, username and wordpress  as appropriate)
[code=.htaccess]
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} \.yourdomain\.co\.uk$ [NC]
RewriteCond %{REQUEST_URI} !^/~username/wordpress/
RewriteRule (.*) wordpress/$1 [/code]
The .htaccess file must be created and uploaded as a text file and file permissions should be 0640.
David