1. In the local environment, post in postman , http://api.aims-api.localhost/v1/tasks?group_id=015ce30b116ce86058fa6ab4fea4ac63 , the response is successful
2. In development environment, post in postman , http://wjdev2.chinamcloud.com:8659/v1/tasks?group_id=015ce30b116ce86058fa6ab4fea4ac63 , the response failed, as shown in Figure 2
Figure 2
3. Edit the Dockerfile of the interface (RPC client), and delete the passthru in disable_functions
FROM registry-vpc.cn-beijing.aliyuncs.com/cmc/centos-nginx112-php71:0.2.4
MAINTAINER wangqiang@chinamcloud.com
RUN sed -i 's/open_basedir = .\/:\/sobey:\/tmp:\/data:\/webtv/;open_basedir = .\/:\/sobey:\/tmp:\/data:\/webtv:\/usr\/local\/php/g' /usr/local/php/etc/php.ini && \
sed -i 's/allow_url_fopen = Off/allow_url_fopen = On/g' /usr/local/php/etc/php.ini && \
sed -i 's/disable_functions = exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show/disable_functions = system,shell_exec,escapeshellarg,escapeshellcmd,dl,popen,show/g' /usr/local/php/etc/php.ini
COPY code /sobey/www/aims-api
COPY code/build/c_files/ /
RUN chown -R nginx:nginx /sobey/www/ && \
rm -rf /etc/nginx/conf.d/status.conf && \
chmod +x /usr/local/bin/composer && \
cd /sobey/www/aims-api && \
composer install
4. Edit the Dockerfile of the RPC server and delete the passthru in the disable_functions
FROM registry-vpc.cn-beijing.aliyuncs.com/cmc/centos-nginx112-php71:0.2.4
MAINTAINER wangqiang@chinamcloud.com
RUN sed -i 's/open_basedir = .\/:\/sobey:\/tmp:\/data:\/webtv/;open_basedir = .\/:\/sobey:\/tmp:\/data:\/webtv:\/usr\/local\/php/g' /usr/local/php/etc/php.ini && \
sed -i 's/allow_url_fopen = Off/allow_url_fopen = On/g' /usr/local/php/etc/php.ini && \
sed -i 's/disable_functions = exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show/disable_functions = system,shell_exec,escapeshellarg,escapeshellcmd,dl,popen,show/g' /usr/local/php/etc/php.ini
COPY code /sobey/www/aims-rpc
COPY code/build/c_files/ /
RUN chown -R nginx:nginx /sobey/www/ && \
rm -rf /etc/nginx/conf.d/status.conf && \
chmod +x /usr/local/bin/composer && \
cd /sobey/www/aims-rpc && \
composer install
5. In the development environment, post in postman , http://wjdev2.chinamcloud.com:8659/v1/tasks?group_id=015ce30b116ce86058fa6ab4fea4ac63 , respond to success
Leave a Reply