Installation on subdomain: File not found

I tried installing Zenphoto on a subdomain and I got an error. I then tried installing Zenphoto using the same files (copied to another folder) on the regular domain and it worked fine (changed the zp-config.php file of course).

Here's my info:

subdomain:
albums.plester.ca directed to /var/www/albums/ <- Zenphoto files are installed in this folder
When I go to the site http://albums.plester.ca it doesn't look right... Try it and see... The login page looks fine (http://albums.plester.ca/zp-core/admin.php) but when I login it redirects me to: http://www.plester.ca/zp-core/admin.php?page=options&saved#tab_admin and give me a Not Found page. If I navigate to http://albums.plester.ca/zp-core/admin.php after logging in as above, it takes me to the Zenphoto administration page.
Path Overrides in the zp-config.php file:
define('WEBPATH', '/');
define('SERVERPATH', '/var/www/albums/');

regular domain:
www.plester.ca/zenphoto/ directed to /var/www/html/zenphoto/
This one looks normal and works fine.
Path Overrides in the zp-config.php file:
define('WEBPATH', '/zenphoto/');
define('SERVERPATH', '/var/www/html/zenphoto/');

The path overrides section is the only difference between the config files for both setups. mod_rewrite is disabled on both. I don't know what to do here...

Any help would be really appreciated.

Comments

  • All the redirection from albums.plester.ca => www.plester.ca/albums should be handled by your subdomain DNS. What happens if you comment out the path redirects?
  • Thanks for the response.

    albums.plester.ca actually doesn't go to www.plester.ca/albums
    www.plester.ca goes to /var/www/html on the webserver
    the subdomain albums.plester.ca goes to /var/www/albums
    so I can't actually get to the files at albums.plester.ca by going go www.plester.ca/*

    Originally I had the path redirects commented out and the results were the same. I changed them in an effort to get it working.

    It seems like zenphoto is automatically looking for www.plester.ca/ when it should be looking for albums.plester.ca/

    Whenever i manually browse to a page at albums.plester.ca/ it works (except for index.php because I think index.php can't find some files it's looking for - maybe because it's looking at www.plester.ca instead of albums.plester.ca - so defaults to this weird presentation), but if I let zenphoto direct me to a page (such as when I login) it points me to www.plester.ca instead of albums.plester.ca.
  • Zenphoto does not automatically look for any site. That is what the url passed to it is saying. If something is making it go to www.plester.ca, then that is your subdomain DNS information.

    I am successfully running a subdomain on my site. It does work. When zenphoto directs you to a page such as admin.php it does not supply the web address as part of the URL. It will direct to `zp-core/admin.php` Your browser/server are supplying the WEB URL part and that is what is going wrong.
  • Well you sound like you know a lot more about this stuff than I do.

    It sounds like what you're saying is that the webserver or dns server or something is telling zenphoto to look at www.plester.ca when it should be telling it to look at albums.plester.ca

    I think I can test this by making a quick html page with a link to a picture (using relative path) and putting it in albums.plester.ca. If it works, then the webserver is linking correctly, if it doesn't, then I ask the webserver host. Or would this tell me anything at all?

    Or is there somewhere specific that I should be looking in my webserver or subdomain config?

    I realize that this is probably somewhat out of your scope, but I just don't know the next step in troubleshooting this.

    Thanks for your help so far!
  • Unfortunately, it is out of my scope as well. Maybe one of my collegues will have a thought.
  • Well it's working now...

    I put an html file in the subdomain with a relative path link to another file on the subdomain. That worked fine, so I assumed the webserver was working fine.

    After a bunch of looking through php files, I changed toe path override in zp-config.php:
    from: define('WEBPATH', '/');
    to: define('WEBPATH', '');

    That fixed it. Thanks for your help.
Sign In or Register to comment.