Search the Community
Showing results for tags 'hosts'.
-
Hi First great that this is getting developed again - and that the source is now public One problem I always had is that I use Uniform Server for local development - and as such always wanted to use the .test and .localhost top level domains for development as they are reserved to prevent conflict (https://en.wikipedia.org/wiki/.localhost). However EdHost.exe limits the top level domain to 2 or 3 letters (e.g. com, uk). I had a quick look at the code and in the source in lazuras IDE, and in the uniform_common_functions.pas there are two functions - valid_server_name, valid_server_name2 - that both have regex's that cause the limit. For example at line 176 in the function valid_server_name2 we have: //-- Check domain name looks resonable e.g fred.com If valid_input then begin If server_name = 'localhost' Then valid_input := True Else begin If Not ExecRegExpr('^[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$', server_name) Then valid_input := False; end; end; I did a test and by modifying this to allow longer strings {2,9} I can now successfully create .test and .localhost. The official specs allow a max of 63 characters so this really should be {2,63} - https://stackoverflow.com/questions/9238640/how-long-can-a-tld-possibly-be/9239264 I am no Pascal developer but I used lazarus 1.8.4 to build this and it now works exactly as I want. (I had to add LazFileUtils as an extra item to line 20 of us_common_procedures.pas to prevent an error, but maybe that isn't needed in the version 1.2.2 it was originally built in?) Can you update the Uniform release with an updated version of EdHost.exe? That would leave my only other current issue that it cannot automatically create the vhost entry using https... but I think someone has already requested that Thanks again
-
On my new laptop (running Windows 10 Pro), I have created a test server. It appears to be working correctly with one exception -- I cannot enter "laptop-test-server" into the URL field of my browser and bring up the test server. When I do that, the browser brings up a search engine that shows me hits for the search on "laptop-test-server". I have modified the 'hosts', 'httpd.conf', and 'httpd-vhosts.conf' files as I have always done. But this time it doesn't work. I have attached the 'hosts' file in its entirety. I have attached just the last section of the 'httpd.conf' file, because the rest of that file is exactly the original content of the file. And I have attached the 'httpd-vhosts.conf' file. Any suggestions will be greatly appreciated. Len Jacobson My_hosts My_httpd.conf My_httpd-vhosts.conf
- 6 replies
-
- hosts
- test server
-
(and 1 more)
Tagged with:
-
Editor don't accept ext eg. ".info" - Accept ".inf" but DNS don't accept that.