因此可以直接在自己的工作空间运行程序,但当用到eclipse3.7和PDT3.0.2的集成时居然不允许在base url栏填写自己工作空间的目录了,网上查阅包括英文仍无办法,因此只得另想办法。
这个版本的PDT只允许填写不同端口号的base url 的服务器,所以我就在nginx另作一个不同于主端口号的服务端口,把这个端口号的主目录定位到eclipse的工作空间,然后把eclipse的php服务器设置为这个端口号,以后在eclipse工作空间的工程都能自动运行了。
于是修改nginx.conf添加以下几行:
复制代码 代码如下:
#eclipse web port:
#
server {
listen 5000;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root "C:/Program Files/eclipse-php/workspace";
index index.html index.htm index.php;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME c:/PROGRA~1/eclipse-php/workspace$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
}
如果你有ssl设置,可以再添加:
复制代码 代码如下:
server {
listen 5443;
server_name localhost;
ssl on;
ssl_certificate akann.crt;
ssl_certificate_key akann.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
location / {
root "C:/Program Files/eclipse-php/workspace";
index index.html index.htm index.php;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME c:/PROGRA~1/eclipse-php/workspace$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
include fastcgi_params;
}
}
这里记住"C:/Program Files/eclipse-php/workspace"和c:/PROGRA~1/eclipse-php/workspace就是你工作空间的目录,我用的是windows,unix目录自行修改。
另外再修改eclipse的php服务器设置:
这个版本的PDT只允许填写不同端口号的base url 的服务器,所以我就在nginx另作一个不同于主端口号的服务端口,把这个端口号的主目录定位到eclipse的工作空间,然后把eclipse的php服务器设置为这个端口号,以后在eclipse工作空间的工程都能自动运行了。
于是修改nginx.conf添加以下几行:
复制代码 代码如下:
#eclipse web port:
#
server {
listen 5000;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root "C:/Program Files/eclipse-php/workspace";
index index.html index.htm index.php;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME c:/PROGRA~1/eclipse-php/workspace$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
}
如果你有ssl设置,可以再添加:
复制代码 代码如下:
server {
listen 5443;
server_name localhost;
ssl on;
ssl_certificate akann.crt;
ssl_certificate_key akann.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
location / {
root "C:/Program Files/eclipse-php/workspace";
index index.html index.htm index.php;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME c:/PROGRA~1/eclipse-php/workspace$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
include fastcgi_params;
}
}
这里记住"C:/Program Files/eclipse-php/workspace"和c:/PROGRA~1/eclipse-php/workspace就是你工作空间的目录,我用的是windows,unix目录自行修改。
另外再修改eclipse的php服务器设置:
标签:
nginx,php5
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“关于nginx+php5.3.8+eclipse3.7工作空间的配置方法”评论...
更新动态
2024年05月13日
2024年05月13日
- 大张伟《大张伟歌曲合集》[320K/MP3][89MB]
- 郭金发.2002-台湾红歌100年·台语精选辑CD13【乡城】【WAV+CUE】
- 殷正洋.1994-等一个人【巨石】【WAV+CUE】
- 王馨平.2014-Truly【秘密花园】【WAV+CUE】
- 邓涛-精选十五首HIFI最爱天碟《试音邓涛》[WAV分轨]
- 绚香《ayakasHistory2006-2009》24bit-96kHz【Hi-Res】【flac】
- 群星-重力加速度·蓝白经华连串曲蓝与白-1991-WAV+CUE
- 孙楠《孙楠歌曲合集》[320K/MP3][252.2MB]
- 刀郎《刀郎歌曲合集》[320K/MP3][362.6MB]
- 杨培安《杨培安歌曲合集》[320K/MP3][257.1MB]
- [In-AkustikINAK7803]VA-ThePinnacleOfCheskyVoiceChesky非凡女声2017[SACD-ISO]
- 王之炅薛颖佳-中国小提琴名曲(2.8MHzDSD)DSF
- 群星-重力加速度·蓝白经华连串曲蓝与白-1991-WAV+CUE
- 群星-将爱情进行到底电视剧原声音乐中唱-1999-WAV+CUE
- [ABC唱片]徐刚-独步外滩WalkingOntheBundPerryShi(SACD).iso