Curl connection refused on 127.0.0.1

php

#1

Hi, All!

First, I want to sorry for my english.

I want to try use circleCI with php+yii2 for testing full actions. But, when i try to check API’s calls, i get curl error:

[GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to localhost port 80: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

I 80 percent sure, that a week ago my functional test worked fine and not crushing because of curl refused connection.

I create demo rep with yii2 and circleCI2.0 where you can see this error: https://github.com/zukko4367/cci2-yii2-demo/

Can anyone help me with this issue?

Last test excecution: https://circleci.com/gh/zukko4367/cci2-yii2-demo/34

Thanks.


#2

Can you try starting Apache in the same step where you run your tests?


#3

Thanks very much, it works!

I think, you should add this to here:https://discuss.circleci.com/t/getting-started-php/.
Someone it can save many time.

I want to ask another question. How can i change DocumentRoot of apache.
In Yii2 DocumentRoot must be in “./web” of current workdir. Im try to modify default apache config by sed command, but after change, apache still looking to “/var/www/html” instead of “/var/www/html/web”


#4

You will need to add a virtual host to point to that directory, then reload Apache.

https://httpd.apache.org/docs/2.4/vhosts/examples.html


#5

Im add sitename.conf file to my rep. It is not how i want to do this, but its works.

I want to create independent configuration for test. But i think, that enough.

Thanks


#6