{"action":"opened","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/3909","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/3909/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/3909/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/3909/events","html_url":"https://github.com/magento/magento2/issues/3909","id":143843480,"number":3909,"title":"SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://magento.local/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity","user":{"login":"yssource","id":3756334,"avatar_url":"https://avatars.githubusercontent.com/u/3756334?v=3","gravatar_id":"","url":"https://api.github.com/users/yssource","html_url":"https://github.com/yssource","followers_url":"https://api.github.com/users/yssource/followers","following_url":"https://api.github.com/users/yssource/following{/other_user}","gists_url":"https://api.github.com/users/yssource/gists{/gist_id}","starred_url":"https://api.github.com/users/yssource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yssource/subscriptions","organizations_url":"https://api.github.com/users/yssource/orgs","repos_url":"https://api.github.com/users/yssource/repos","events_url":"https://api.github.com/users/yssource/events{/privacy}","received_events_url":"https://api.github.com/users/yssource/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-27T20:00:29Z","updated_at":"2016-03-27T20:00:29Z","closed_at":null,"body":"On my /etc/hosts, I add \r\n`127.0.0.1        magento.local`\r\n\r\nIn the backend of my site, setting \"Not Secure Base URL\" with \"http://magento.local/\"\r\nand \"Secure Base URL\" with \"http://magento.local/\" as well.\r\n\r\nOn nginx.conf, configure it \r\n```\r\nserver {\r\n    listen      80;\r\n    ...\r\n}\r\n```\r\nand\r\n```\r\nupstream varnish {\r\n    server 127.0.0.1:6081;\r\n    server 127.0.0.1:8080 backup;\r\n    keepalive 35;\r\n}\r\n```\r\nOn apache httpd.conf configure it\r\nlisten 8080 port\r\n```\r\n<VirtualHost *:8080>\r\n...\r\n</VirtualHost>\r\n```\r\n\r\n-  By browser \"http://magento.local/api/v2_soap?wsdl=1\", it would get the xml file successfully.\r\n\r\n-  I try to do the soap api v2 with my script\r\n\r\n```\r\n<?php\r\n \r\n$api_url_v2 = \"http://magento.local/api/v2_soap/?wsdl=1\";\r\n \r\n$username = 'mobile';\r\n$password = 'mobile123';\r\n \r\n$cli = new SoapClient($api_url_v2);\r\n \r\n//retreive session id from login\r\n$session_id = $cli->login($username, $password);\r\n \r\n//call customer.list method\r\n$result = $cli->customerCustomerList($session_id);\r\n```\r\n\r\n-  But, it always gets an exception.\r\n\r\n`SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://magento.local/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity \"http://magento.local/index.php/api/v2_soap/index/?wsdl=1\"`\r\n\r\n-  After a long time research for this problem, I found it is an issue caused by port forwarding from 80 to 8080. If I set both of \"Not Secure Base URL\" and \"Secure Base URL\" with \"http://magento.local:8080/\" at backend. And change my script to be `$api_url_v2 = \"http://magento.local:8080/api/v2_soap/?wsdl=1\"; `, everything is OK. \r\n\r\n- However, I need to use the nginx 80 port to work as reverse proxy and call the SOAP Api by script. \r\n\r\n- Is there any help for me?"}}