Koozali.org: home of the SME Server

custom template help needed for hosts file / wordpress

Offline calisun

  • *
  • 601
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #15 on: August 28, 2012, 08:01:14 AM »
Mary, thank you very much for taking time to help me out.

calisun

Well you are accepting that the wordpress people's answer is absolute, and it seems you are not wanting to look at the code as Charlie has suggested.
No, personally I don't know what and where to look at, so I am willing to try anybodies suggestion.

...
Have you been able to duplicate the whole install & setup process on another server and find that you still have the same issues ?
I do have a test server, but I am unable to point multiple domains to it, but I will try to figure out a way to do it.

...
Do you unzip on a Windows PC and then copy to the ibay via samba/network sharing ?
...

Usually I download to my Ubuntu pc, unzip,  then I upload to an iBay using filezilla (sftp) from a remote location.

This just came to me right now, could this be related?: since I use sftp to upload the wordpress program before install and images only show up when viewing site using https:


calisun

So are you saying that whenever you access using https the images show up each and every time without fail, and conversely whenever you access using http that the images never show up (for the same given example/situation/domain we are referring to)?

A quickie workaround (pending further resolution of the real issue) is just to create an alias to redirect http to https so that all users will automatically use https.
See http://wiki.contribs.org/Https_redirection
That is similar/same as how it is done for webmail etc.

Great thought about the workaround, but this could cause an issue since the domain is not the primary domain and users trying to access the page will get a certificate warning.
« Last Edit: August 28, 2012, 08:19:01 AM by calisun »
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #16 on: August 28, 2012, 08:38:52 AM »
calisun

You do not fully answer all the questions, so it's difficult for me to deduce anything more exactly, please answer all questions one by one, or there is no point in me getting involved if you just want to go off yourself and try and discover what's up.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline calisun

  • *
  • 601
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #17 on: August 28, 2012, 09:12:45 AM »
Sorry, I thought I have answered all questions. It is getting late here and I am sleepy, so I might have missed something. I will get a good night sleep and respond in the morning.

Thank you for all your help.
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: custom template help needed for hosts file / wordpress
« Reply #18 on: August 28, 2012, 02:58:56 PM »
So are you saying that whenever you access using https the images show up each and every time without fail, and conversely whenever you access using http that the images never show up (for the same given example/situation/domain we are referring to)?

And if that is the case, what do you see in httpd/access_log and httpd/error_log at that time?

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: custom template help needed for hosts file / wordpress
« Reply #19 on: August 28, 2012, 04:25:24 PM »
Calisun,
Don't mess it up for all the rest of us noobs. I just got mary to be nice to me. Answer all her questions. And questions mary thought she asked. We worked hard to get these guys to help us nicely, don't you come in here causing waves.
 :grin:

I was just following this topic because, I too am working very closely with WordPress, and I just successfully moved my WordPress from /opt/wordpress/ to my /"iBay"/html/
This was difficult with all the MySQL searching that had to be done, but now it's operational, and I can finally try DOMAIN Mapping Plugin, and W3TC cache plugin.

I know you are probably thinking, "If you are going to follow, follow quietly". But I just wanted to make Calisun laugh. We noobs have to look out for each other, until we become professionally annoyed with newcomers not reading all forums posts and documentation.
 :lol:
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: custom template help needed for hosts file / wordpress
« Reply #20 on: August 28, 2012, 07:20:43 PM »
Why can't you just create a new domain under server-manager panel, and point it to the same ibay as your primary domain. Then WordPress would take over and direct to the proper page? And you would have a nice panel listing of all the domains you have applied.
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline calisun

  • *
  • 601
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #21 on: August 31, 2012, 07:01:37 AM »
Sorry for not replying for couple of days, it has been crazy at work and I had to work late nights.

And if that is the case, what do you see in httpd/access_log and httpd/error_log at that time?

in httpd/access_log:
Code: [Select]
employment-office.net 92.234.22.22 - - [30/Aug/2012:21:48:27 -0700] "GET /files/2012/05/Hiring-Manager-Reading-resume_2-270x300.jpg HTTP/1.1" 404 255 "http://employment-office.net/82/hiring-managers-view-of-your-resume-and-cover-letter/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1"
Primary-domain.com 92.234.22.22 - - [30/Aug/2012:21:48:37 -0700] "GET /employment-office/wp-content/plugins/digg-digg/css/diggdigg-style.css?ver=5.2.3 HTTP/1.1" 304 - "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1"
employment-office.net 92.234.22.22 - - [30/Aug/2012:21:48:37 -0700] "GET /wp-includes/js/comment-reply.js?ver=3.4.1 HTTP/1.1" 304 - "https://employment-office.net/82/hiring-managers-view-of-your-resume-and-cover-letter/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1"
employment-office.net 92.234.22.22 - - [30/Aug/2012:21:48:36 -0700] "GET /82/hiring-managers-view-of-your-resume-and-cover-letter/ HTTP/1.1" 200 90516 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1"

In httpd/error_log:

Code: [Select]
[Thu Aug 30 21:48:27 2012] [error] [client 92.234.22.22] File does not exist: /home/e-smith/files/ibays/my-empire/files/2012, referer: http://employment-office.net/82/hiring-managers-view-of-your-resume-and-cover-letter/
[Thu Aug 30 21:48:27 2012] [error] [client 92.234.22.22] File does not exist: /home/e-smith/files/ibays/my-empire/files/2012, referer: http://employment-office.net/82/hiring-managers-view-of-your-resume-and-cover-letter/
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline calisun

  • *
  • 601
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #22 on: September 05, 2012, 10:37:24 PM »
looking at above,
if I access http://
log says:
File does not exist:

but if I access https://
it shows up.

Correct me if I am wrong, but if it was a permission issue, it would say "access denied" not "file does not exist"

 
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #23 on: September 05, 2012, 11:34:31 PM »
calisun

What is the output of these commands ?
ls -al /home/e-smith/files/ibays/my-empire/html/files/2012

ls -al /home/e-smith/files/ibays/my-empire/files/2012

ls -al /home/e-smith/files/ibays/my-empire/files

ls -al /home/e-smith/files/ibays/my-empire/html

ls -al /home/e-smith/files/ibays/my-empire
« Last Edit: September 06, 2012, 04:32:57 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: custom template help needed for hosts file / wordpress
« Reply #24 on: September 06, 2012, 02:30:57 AM »
Correct me if I am wrong, but if it was a permission issue, it would say "access denied" not "file does not exist"

I believe you are correct. This is not a permissions problem. It's an issue with mapping of URLs to files/directories, and the existence or otherwise of those files/directories. Put your thinking cap on, and keep digging.

Offline calisun

  • *
  • 601
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #25 on: September 30, 2012, 05:50:53 AM »
I keep my fingers crossed, but I think I have figured this out. It is a combination of wordpress and SME issue.

Here is wordpress issue which I have posted it to wordpress forums:

Quote
The reason that https:// works is because it looks like the wordpress primary domain gets called first and it forwards the request to the subfolder, so it looks something like this:
"GET /employment-office/files/2012/05/.......
and I see corresponding code 200 (OK)

but when I go http://
it looks like it gets sent directly to corresponding domain and domain sends code like this:
"GET /files/2012/05/......
and I see corresponding code 404 (Not Found)

The strange thing is that no matter http or https, the header image always gets called:
"GET /employment-office/files/2012/05/.......
and it always shows up.


-->> The SME issue is that when wordpress was calling for "GET /files/2012/05/......, SME was looking in: /iBay/files
I don't understand why it would drop down a level from /html directory since inside wordpress it is set as the base directory.

Anyway, my workaround that seems to work for now is to rename /files directory, so when SME does not find it (I am assuming) it looks inside /html directory.
« Last Edit: September 30, 2012, 06:04:20 AM by calisun »
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #26 on: September 30, 2012, 07:03:51 AM »
calisun

Quote
my workaround that seems to work for now is to rename /files directory, so when SME does not find it (I am assuming) it looks inside /html directory.

I assume you mean rename
/home/e-smith/files/ibays/my-empire/files/

That .../files folder will probably be recreated during a major system event eg post-upgrade or ibay changes

If I understand and/or assume what your issue is correctly, then perhaps a better long term solution is to move the contents of
/home/e-smith/files/ibays/my-empire/html/files/
to
/home/e-smith/files/ibays/my-empire/files/

or otherwise change the code to read the correct ..../files/ folder
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: custom template help needed for hosts file / wordpress
« Reply #27 on: September 30, 2012, 10:00:19 PM »
I don't understand why it would drop down a level from /html directory since inside wordpress it is set as the base directory.

That's just the way that i-bays work. They are designed to be that way. This is one of the reasons why I've always there are better ways to deploy web applications than just dropping them in an i-bay. Use a custom template, or better yet, a contrib rpm which provides the correct application specific template.

Offline calisun

  • *
  • 601
  • +0/-0
Re: custom template help needed for hosts file / wordpress
« Reply #28 on: October 02, 2012, 08:40:15 AM »
Hi Mary, good to hear from you

calisun

I assume you mean rename
/home/e-smith/files/ibays/my-empire/files/

yes, that is correct.

That .../files folder will probably be recreated during a major system event eg post-upgrade or ibay changes
I just did system update, and post-upgrade, and the change is still there.

If I understand and/or assume what your issue is correctly, then perhaps a better long term solution is to move the contents of
/home/e-smith/files/ibays/my-empire/html/files/
to
/home/e-smith/files/ibays/my-empire/files/

The issue is that there is no such folder as:
/home/e-smith/files/ibays/my-empire/html/files/

the wordpress folder structure is:
/home/e-smith/files/ibays/my-empire/html/wp-content/blogs.dir/#/files/2012/09/   (# is blog#)

wordpress uses htaccess to rewrite / shorten the URL.

or otherwise change the code to read the correct ..../files/ folder

Personally I have no idea where in code the call is created, so I have posted a question on wordpress forum to see if anybody knows. 
But in the mean time, my trick to rename /files folder seems to work.

 
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: custom template help needed for hosts file / wordpress
« Reply #29 on: November 20, 2012, 01:42:58 AM »
I am now dealing with this, but renaming "'ibay'/files" to "'ibay'/fi" does not solve it for me.
If installed to the /opt directory through the rpm or SMESiteMaker, you cannot successfuly run a multisite installation, there's no way to  point the domain to an /opt/ directory instead of an ibay. So in order to use Wordpress MU as your main CMS, it has to be in an ibay. Any more development on this issue with the url rewrite rule? Anyway to change the rewrite rule to include the right GET for the primary domain?
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware