WebFaction
Community site: login faq

Maybe is a silly question, but... WebFaction uses xginx to serve static content and apache to serve dynamic content with PHP and in the routing system, they are set to parse different directories content. My question is: can PHP write anywhere in the filesystem and so also static content to be served by xginx, i.e images uploaded by visitors? Thanks

asked 27 Feb '12, 03:16

robertotra
5721221
accept rate: 0%


Yes, that's possible. You can set your PHP application to upload images to a directory and then create a symbolic link application there, which will treat the contents of that directory as if it were a Static-only application and have the files served by nginx.

permanent link

answered 27 Feb '12, 04:18

iliasr ♦♦
2.1k14
accept rate: 35%

Thanks, good to know that I can differentiate how content is served inside a single app. But this reply only partly to my question: can PHP inside and app read and write everywhere inside the plan (by use of the filesystem path) or is it confined inside its app space?

(27 Feb '12, 04:53) robertotra

I'm sorry I've missed that. PHP processes are running as your user so it has read and write permissions everywhere you have.

(27 Feb '12, 05:04) iliasr ♦♦

Perfect. Thanks!

(27 Feb '12, 05:12) robertotra

Sorry, I need to specify a new case about this question:

I have created a new application and created a symbolic link to set the document root in a subfolder:

|--myapp
. |--private folder (code and configuration files)
. |--public folder (document root for my domain)

This public folder will contain the public PHP files and any static content and will be therefore managed by Apache. If I made a subfolder of it for all the static content, may I let it be managed by Nginx? It should be:

|--myapp
. |--private folder (code and configuration files)
. |--public folder (document root for my domain - managed by Apache)
... |--php folder (other PHP pages, still managed by Apache)
... |--static folder (images, js, css to be managed by Nginx)

Is it possible to set a symbolic link to be managed by Nginx to a subfolder of another symbolik link managed by Apache?

Thanks and regards
Roberto

(07 Mar '12, 05:34) robertotra

It should work. If you run into trouble submit a support ticket indicating which website configuration is failing and we will take a look at it with live data.

(07 Mar '12, 22:49) johns
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×225
×125
×1

question asked: 27 Feb '12, 03:16

question was seen: 3,343 times

last updated: 07 Mar '12, 22:49

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM