Select to view content in your preferred language

Quick question about using the proxy page

708
4
05-17-2010 01:00 AM
MostafaAsadi
Emerging Contributor
Does anyone know why this proxy page has to be in the root directory of my web server? Or does it?! Can't I just put it in the same directory with the rest of my scripts and change the proxy path reference inside the script?

Thanks!
0 Kudos
4 Replies
AlessioDi_Lorenzo
Emerging Contributor
I develop my apps in Eclipse and I usally put the proxy page (jsp) in the WebContent dir, at the same level of the index.html or index.jsp.
Anyway I believe it's not important where the proxy page is placed... but you have to correctly reference it in
esri.arcgis.Config.proxyUrl=/path/to/proxy_page


Hope this helps
0 Kudos
MostafaAsadi
Emerging Contributor
Thanks. I believe WebContent dir is the same as the root dir of your web server am I correct? In that case this means that the proxy file has to be in the root folder. But why can't it be anywhere on the same server?! Btw an article on ESRI confirms the statement that the said file has to be in the root folder:

For PHP, unzip the file into the Web applications directory. For Apache installs of PHP, this would be a folder under "htdocs" in the Apache install location. For IIS installs, this would be a folder under "wwwroot".


Article:
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/ags_proxy.htm
0 Kudos
AlessioDi_Lorenzo
Emerging Contributor
For PHP, unzip the file into the Web applications directory. For Apache installs of PHP, this would be a folder under "htdocs" in the Apache install location. For IIS installs, this would be a folder under "wwwroot".


The proxy page can be written in the programming/scripting language you decided to use, in your case this is PHP if I understood correctly. Your proxy page must be visible for the PHP interpreter, exactly like any other php script. In a default php installation this is under the webserver root.
0 Kudos
MostafaAsadi
Emerging Contributor
I see, thanks!
0 Kudos