0
votes

I would like to be able to use the OpenShift Wordpress Example to host a wordpress blog for an organization. What I want to do is have it setup like this:

The trouble I've had is trying to get wordpress to be served up from a subdirectory rather than a subdomain or the root domain. I've tried the directions given from Codex. Restarting the server gives me a the following error whenever I move the wordpress install to a /blog subdirectory:

Pushing to ##.....
remote: Stopping PHP cartridge        
remote: Waiting for stop to finish        
remote: Stopping MySQL cartridge        
remote: Building PHP cartridge        
remote: Starting application website        
remote: Starting MySQL cartridge        
remote: Database already configured.        
remote: Starting PHP cartridge        
remote: Syntax error on line 2 of /var/lib/openshift/523540c05973ca9f4e000418/php/configuration/etc/conf.d/openshift.conf:        
remote: DocumentRoot must be a directory        
remote: An error occurred executing 'gear postreceive' (exit code: 1)        
remote: Error message: Failed to execute: 'control start' for /var/lib/openshift/523540c05973ca9f4e000418/php        
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.        
To ssh://....
   fcd93d5..480ca5d  master -> master
updating local tracking ref 'refs/remotes/origin/master'
Completed successfully

I'm not sure what to do to fix this.... Is there anyway I could fix this setup? Or is there a way that I could leave the setup as is but setup my DNS records to have the blog served up from a /blog subdirectory?

I have limited experience here so I'm taking blind stabs in the dark and it's not working too well...

I am able to make it live on a subdomain, but I'd rather not do that because my organization's website lives on a subdomain anyway so it would be like: http://blog.sub.example.com and that's just a lot of dots... Thanks for any pointers!

1
The error indicates that your $OPENSHIFT_REPO_DIR/php dir is not present. That's your webroot for the PHP-5.3 cartridge. What exactly did you modify? I tried going through the guide: codex, but it didn't work for me due to various PHP warnings/errors - Nam Duong
Feel free to post your questions to our forums as many team members and community members can help there. - Nam Duong
@NamDuong, I modified the deploy file to point resources to the new directory. It seemed to be the only place that referenced the $OPENSHIFT_REPO_DIR where it mattered in this context. - kentcdodds

1 Answers

1
votes

Try adding it to php/blogs/* instead of blogs/*