On Thu, Feb 28, 2013 at 3:36 PM, Paulo J. Matos <pa...@matos-sorge.com> wrote:
> Hello,
>
> I am trying to get openphoto installed in photos.matos-sorge.com, this is a
> subdomain of matos-sorge.com, which I own.
>
> To implement the subdomains I have a virtual host that starts with:
>   RewriteEngine on
>   # Rewrite everything for example.com to the
>   # /www/ subdirectory
>   RewriteCond %{HTTP_HOST} ^matos-sorge\.com
>   RewriteRule ^(.*) /subdomains/www/$1 [L]
>
>   # Rewrite all other example.com subdomains
>   # to their own directory
>   RewriteCond %{HTTP_HOST} ^([^\.]+)\.matos-sorge\.com
>   RewriteCond /var/www/matos-sorge.com/subdomains/%1 -d
>   RewriteRule ^(.*) /subdomains/%1/$1 [L]
>   RewriteCond %{HTTP_HOST} ^([^\.]+)\.matos-sorge\.com
>   RewriteCond /var/www/matos-sorge.com/subdomains/%1 -l
>   RewriteRule ^(.*) /subdomains/%1/$1 [L]

What? Why are you doing some rewrite magic, and not simply defining
virtualhosts for your subdomains?

>
>
> So, I install my subdomains in
> /var/www/matos-sorge.com/subdomains/<subdomain-name>
>
> openphoto has its root in /src/html, therefore I installed openphoto in
> /usr/local/webapps and created a link:
> /var/www/matos-sorge.com/subdomains/photos ->
> /usr/local/webapps/openphoto/src/html
>
> Then I have some recommended stuff from the openphoto project in a directory
> directive:
>   <Directory /var/www/matos-sorge.com/subdomains/photos >
>     Options -Indexes
>
>     Order deny,allow
>     Allow from all
>
>     RewriteEngine on
>     RewriteCond %{REQUEST_FILENAME} !-f
>
>
>     RewriteCond %{REQUEST_FILENAME} !-d
>
>
>     RewriteRule ^(.*)\?*$ /index.php?__route__=/$1 [L,QSA]
>
>     # 403 Forbidden for ini files
>     RewriteRule \.ini$ - [F,NC]
>
>     AddOutputFilterByType DEFLATE text/plain
>     AddOutputFilterByType DEFLATE text/html
>     AddOutputFilterByType DEFLATE text/css
>     AddOutputFilterByType DEFLATE application/x-javascript
>     BrowserMatch ^Mozilla/4 gzip-only-text/html
>     BrowserMatch ^Mozilla/4\.0[678] no-gzip
>     BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
>
>
>
>     ExpiresActive On
>     ExpiresByType text/javascript "A31536000"
>     ExpiresByType application/x-javascript "A31536000"
>     ExpiresByType text/css "A31536000"
>     ExpiresByType image/x-icon "A31536000"
>     ExpiresByType image/gif "A604800"
>     ExpiresByType image/jpg "A604800"
>     ExpiresByType image/jpeg "A604800"
>     ExpiresByType image/png "A604800"
>
>     Header set Cache-Control "must-revalidate"
>     FileETag MTime Size
>
>   </Directory>
>
>
> Unfortunately however this doesn't work. It seems that openphoto is trying
> to use the .../subdomains/photos/ base to search for php scripts, so I get
> the error:
> [Thu Feb 28 14:54:07 2013] [error] [client 86.158.100.182] PHP Fatal error:
> require(): Failed opening required
> '/var/www/matos-sorge.com/subdomains/photos/src/libraries/dependencies.php'
> (include_path='.:/usr/share/php:/usr/share/pear') in
> /usr/local/webapps/openphoto/src/libraries/models/UserConfig.php on line 88
>
> So, this doesn't really exist, what exists is
> /usr/local/webapps/openphoto/src/libraries/dependencies.php.
>
> How can I hide to openphoto the fact that it is installed as a subdomain and
> that it's installation directory is not actually the root of the document
> being served (so photos.matos-sorge.com/src doesn't exist since
> photos.matos-sorge.com is already serving
> /usr/local/webapps/openphoto/src/html)?
>

Use a real virtualhost that has a proper DocumentRoot for each subdomain.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to