Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

ERR_NAME_NOT_RESOLVE #1319

Open
Matleyx78 opened this issue Nov 21, 2019 · 9 comments
Open

ERR_NAME_NOT_RESOLVE #1319

Matleyx78 opened this issue Nov 21, 2019 · 9 comments

Comments

@Matleyx78
Copy link

Hi guys....
I have a strange problem with the installation that i explain to you:
I hava anapache server in my lan where i test my project. In this server i setting up a new site wich i'llwant to use to testing a my new project with bonfire.
When i setting the site, before unzip the source, i tested it with a simple index.html file and the site works fine, but when i try to put in directory the source don't work, and the browser tell me err:name_not_resolve.
If i delete all source and re-put the index.html, don't work.
I shold only delete ALL configuration in apache and all directory and restart from begin.

Is there anyone that had this problem?

Thanks a lot

Sorry for my bad english... ;)

@Matleyx78
Copy link
Author

Matleyx78 commented Nov 21, 2019

this is my apache site config:

<VirtualHost *:80>

        ServerName www.nuovoj.com
        ServerAlias nuovoj.com
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/nuovoj.com/bfci/public/
<Directory /var/www/nuovoj.com/bfci/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

@silverark
Copy link
Contributor

silverark commented Nov 21, 2019

The domain doesn't point anywhere. nuovoj.com.

You need to add the name to your hosts file (/etc/hosts). If you're connecting from a separate machine on your network, you will need to add a row to the hosts file on your current machine too.

Are you on Windows or Linux?

https://support.managed.com/kb/a683/how-to-modify-your-hosts-file-so-you-can-work-on-a-site-that-is-not-yet-live.aspx

@Matleyx78
Copy link
Author

Matleyx78 commented Nov 21, 2019

Thank you Silverak. I'm in a domain lan, where thereis a dns server. In this server is just setting the domain nuovoj.com, that pointing to the right ip adress.
In fact, at start, before unzip bonfire, this site works fine: in my browser from another machine (not server dns, not server apache) i type http://www.nuovoj.com, and works fine (whith custom index.html file in bfci/public folder).
The problem start after i unzip bonfire-develop.zip.....
I'm very out of head for this strange strange problem.
Ah... Another... on this apache server there are another 3 sites, all available and worked in LAN....

@silverark
Copy link
Contributor

There could be a few things.

  1. Have you set your URL in the application/config/config.php file? If not it might try redirecting you to the IP instead.
  2. Did you restart Apache after you made your changes to the vhost file?
  3. Do you definitely have the www A record in there too?

To debug the issue, you can use your hosts file locally to ensure there are no DNS issues. Just add a record to go straight to the server. Then you should be able to look in your log files on the server to see where it's hitting. If your testing wit a browser, check the headers returned and make sure you're not just been redirected.

@Matleyx78
Copy link
Author

  1. Have you set your URL in the application/config/config.php file? If not it might try redirecting you to the IP instead.
    Yes:
    $config['base_url'] = 'http://www.nuovoj.com';
  1. Did you restart Apache after you made your changes to the vhost file?
    Yes, i restarted apache service and after the pc also
  1. Do you definitely have the www A record in there too?
    Yes, like the other sites hosted in that server.

@Matleyx78
Copy link
Author

Thi is the respons by chrome inspector:

Request URL: http://nuovoj.com/
Referrer Policy: no-referrer-when-downgrade
Provisional headers are shown
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36

@Matleyx78
Copy link
Author

I try to reset all another time.....
I set the site with the same directory structure, but without the bonfire's files.
Now, if i open the site, i see my test index page. It's work.
This i the header response:

Request URL: http://www.nuovoj.com/ Request Method: GET Status Code: 200 OK Remote Address: 192.168.1.108:80 Referrer Policy: no-referrer-when-downgrade Accept-Ranges: bytes Connection: Keep-Alive Content-Length: 48 Content-Type: text/html Date: Thu, 21 Nov 2019 14:06:38 GMT ETag: "30-597dbc085055d" Keep-Alive: timeout=5, max=100 Last-Modified: Thu, 21 Nov 2019 14:02:47 GMT Server: Apache/2.4.10 (Debian) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3 Accept-Encoding: gzip, deflate Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7 Cache-Control: no-cache Connection: keep-alive Host: www.nuovoj.com Pragma: no-cache Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

I try it from another pc in lan and it's work.

Now i'll try to unzip bonfire and i hope.............................

@Matleyx78
Copy link
Author

Matleyx78 commented Nov 22, 2019

DON'T WORK!!!!
On my apache server, bonfire don't work..... i don't understand the motive....

I try on xampp and localhost on my workstation and works fine.....
I founded a littel bug on BF_Router.php at line 301:
I changed this:
if (strpos($class, $suffix) === false) {
to this:
if (strpos($class, chr($suffix)) === false) {

@GintaWahyudi
Copy link

"this .htaccess note yourdomain.com not use http:// or https://"

Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^yourdomain.com$
RewriteCond %{REQUEST_URI} !public/
RewriteRule (.*) /public/$1 [L]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants