In the past the test php apps that I've created have all been at the top level - meaning that the entrance page has always been at /home2/MYNAME/webapps/appname/index.php No worries there. Now I'm testing a micro-php framework that does the action-mapping for me in pure php code (trying to get away from writing all the glue code myself). This is only a test so far, but the documentation at Webfaction doesn't make it clear how this would be installed. On my test server at home I have to create a symbolic link in the apache conf that points the top level to (say) /var/www/testsite/webroot/ because /webroot/ is the directory that holds the index.php. At the same level as the webroot folder are other folders that hold parts of the application server, such that ../foldername/ is sprinkled throughout. Of course I can change all the mapping, but that is tedious. I'd rather do something similar here at Webfaction that I do at my home server, meaning that the webroot directory will be the top directory (it will be /home2/MYNAME/webapps/appname/webroot/index.php where index.php is provided by the framework). At Webfaction there are instructions on creating a symbolic link using the extra_info field, but that didn't seem to work on the first attempt. I received an error in the installation of the application. I know that index.php can be used at the top level as a type of forward, but that isn't spelled out anywhere in the Webfaction docs as supported. Does someone know step-by-step how this can be done? Basically the webroot folder has its own .htaccess. I just need AFAICT to make sure that the "appname" folder has a symbolic link that says appname/webroot/ is actually the / folder for the app. Thanks ahead of time asked 23 Sep '11, 13:56 mumin |
Answer from the poster - after trial and error. In essence you need two Webfaction applications to get this to work (at least with these micro-PHP frameworks).
Now, if this second, symbolic application (the symbolic link) has a universal URL as mycompany.com this url will go to the symbolic link of the other application and load from the actual application running. answered 23 Sep '11, 15:33 mumin thanks, your advice worked for me!
(18 Jan '12, 17:37)
richard
|
Hmm... using
/home2/MYNAME/webapps/appname/webroot
as a symlink path shouldn't cause any errors, and that's definitely the way we recommend setting up things for that sort of framework.Can you let me know the exact symlink path you used and the exact error that you saw?
Feel free to open a support ticket if you'd rather not share that info in the forum.
It occurs after reading your comment that maybe the issue would be the syntax of the symbolic link. Could you share if there is any special syntax for the symbolic link that would be needed to set the extra_info?
There's nothing special. The syntax is simply that it needs to be an absolute path to the directory that you want to serve, eg
/home2/MYNAME/webapps/appname/webroot
Hmm - and the application type should be CGI/STATIC/PHP or it should be custom? I'm going to try again.
The application category should be "Symbolic Link" and the type should be whichever of the three is most appropriate.