Accessing xampp vhost too slow when there is no internet - networking

Ok so I have a local web server in my local network, I used xampp and a vhost to configure it
<VirtualHost *:80>
ServerName www.management-eli.com
ServerAlias www.management-eli.com
ServerAdmin webmaster#management-eli.com
DocumentRoot "D:/SchoolAppDeploy"
<Directory D:\SchoolAppDeploy>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
Header set Access-Control-Allow-Origin "*"
And In hosts file
127.0.0.1 www.management-eli.com # management file
of course I changed the IP address to the server's IP in other machines.
Now this worked just fine, sometimes it's too slow to load on other computers, the problem is that yesterday I had an internet connection issue, this should not affect my local network but when I tried accessing from other computers I got the timeout error took too long to respond, and when I tried accessing the website from the server itself using the name www.management-eli.com, it will take several seconds to load, but when I disabled the Wi-Fi it worked instantly, it is as if it tries to lookup the name online first

Related

Cannot access wp admin on another computer in local network

I have created a wordpress website on a wampserver 3.2.6 and wanted to access the website, as well as admin panel from another device(pc) on a local network but I get an error (err_refuse_to_connect). I have read some topics and tested some solutions and it partially works. The page loads when I type ip address of the server where the website is, but only text loads, without images and I cannot access the admin panel. I have configured httpd-vhosts.conf file like this:
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot D:/wamp64/www
<Directory "D:/wamp64/www">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Also I have created a rule in firewall to allow inbound connections on port 80 and added ip address of a computer I want to connect in hosts file. Is there any simple and clear solution for this?
Change your wordpress setting's URL to a Local IP address.
localhost will always goto 127.0.0.1 but I doubt

i am having problems when i try access localhost wordpress site from mobile

i am designing my wordpress website in my localhost with using wampp 3.1.7 (apache 2.4.38) and i tried reach my project from mobile.
i read stackoverflow topics and applied steps one by one :
-added 8080 port in my firewall "incoming rules"
edited rooter NAT with my ip : 192.168.0.xx and port 8080
i changed apache httpd.conf like :
Listen 0.0.0.0:8080
Listen [::0]:8080
<Directory />
AllowOverride none
Require all granted
</Directory>
onlineoffline tag - don't remove
Require all granted
ServerName localhost:8080
and edited httpd-vhosts like :
# Virtual Hosts
<VirtualHost *:8080>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Everything work well localhost:8080/mysite or 192.168.1.xx/mysite work well too.wampp systemtry icon is glowing green with red dot. its online and working well too.
when i try enter 192.168.1.xx from my phone i am entering wamppserver settings.but if i add /mysite (192.168.1.xx) i had error localhost refused to connect. (err_connection_refused)
tried everything but didn't get the result.sorry for my bad language..
1 more question..how can i open that server everyone for share my website design with friends to get feedback its possible ?

ERR_NAME_NOT_RESOLVED on third level domain localhost for WPMU

I'm setting up WP Network on my localhost. I'm on windows, using Uniform Server, and I've setup a vhost like this:
<VirtualHost *:${AP_PORT}>
ServerAdmin webmaster#themes.wp
DocumentRoot ${US_ROOTF}/vhosts/themeswp
ServerName themes.wp
ServerAlias www.themes.wp *.themes.wp
ErrorLog logs/themes.wp-error.log
CustomLog logs/themes.wp-access.log common
<Directory "${HOME}\vhosts\themeswp">
Options Indexes Includes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
plus I've added this on the windows Host:
127.0.0.1 themes.wp
If I go to
themes.wp
everything loads fine. If I try a third level domain, like
dummy.themes.wp
I get
ERR_NAME_NOT_RESOLVED
Wordpress Network tells me this:
Warning! Wildcard DNS may not be configured correctly!
The installer attempted to contact a random hostname (9f3c9c.themes.wp) on your domain.
This resulted in an error message: cURL error 6: Could not resolve host: 9f3c9c.themes.wp
Right, themes.wp and dummy.themes.wp different domains
Fast way: add dummy.themes.wp to you hosts file
127.0.0.1 dummy.themes.wp
Or install any simple dns server because hosts not support wildcard domains

Error 403 when trying to access localhost

Good morning all.
I run a small in office dev (xampp) server for the build of static and WordPress websites on my Ubuntu machine.
I use vhosts for which two are workingabsolutly fine. However, I have another which for some reason keeps failing when I try to load the site.
My Xampp install is a typical /opt/lampp install, nothing unique or special.
My vhosts File
##Summerschool Development Version (which works fine)
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/summerschooldev"
ServerName summerschoolforteensuk.com
<Directory "/opt/lampp/htdocs/summerschooldev/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
##Summerschool old website (which works fine)
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/summerschool"
ServerName summerschoolold.com
<Directory "/opt/lampp/htdocs/summerschool/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
##scp old website throws error 403 You don't have permission to access / on this server..
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/scp"
ServerName scpold.com
<Directory "/opt/lampp/htdocs/scp/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Now my hosts file
127.0.0.1 summerschoolforteensuk.com
127.0.0.1 summerschoolold.com
127.0.0.1 scpold.com
From what I can see, everything seems to be working fine. Im relativly new to working like this but poor internet speed at my office means I have to. Im guessing that there is not error here as the other two sites work fine.
Is there something Im missing if not where would I look next.
Thanks
I seem to have solved this by installing wordpress locally and importing my database and wp-content folder into the install and using the full domain for the server name and host.
Dont think this has solved my issue but its working now.

IIS & XAMPP Conflict, Ports Already Changed

I have IIS enabled (fresh "install") and a port configured XAMPP install with a fresh Wordpress build.
httpd.conf (changes):
Listen 8080
ServerName localhost:8080
httpd-ssl.conf (changes):
Listen 4433
<VirtualHost _default_:4433>
ServerName www.example.com:4433
httpd-vhosts.conf (changes):
NameVirtualHost *:8080
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/foobar"
ServerName foo.bar
<Directory "C:/xampp/htdocs/foobar">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
hosts (changes):
127.0.0.1 localhost
127.0.0.1 foo.bar
Tests:
http://localhost/
IIS Root (expected)
http://localhost:8080/[dashboard]
XAMPP Root (expected)
http://localhost:8080/foobar
resolves to http://localhost/foobar, displays IIS error page (incorrect, should show the Wordpress install)
http://foo.bar
displays IIS root (incorrect, should show Wordpress install)
http://foo.bar:8080
resolves to http://foo.bar (same result as above)
Honestly, at this point I have no idea what I have setup that is incorrect. I've spent all day reading forums and SO, and I'm not making any headway. Help? Am I making incorrect assumptions on behavior or do I have a mistake in my setup?
Assuming that you want both services running at the same time, that you'll mostly be working with XAMPP. This is my solution:
I'm not a fan of typing in port 8080 whenever I want to be working with XAMPP. So I just changed the post number of IIS to 82.
Start IIS (7) On the left go to YOUR MACHINE > Sites > Default Web Site
Then on the right click on bindings then a window pops up
Click on the first row and edit the port number to anyting but 80 (because 80 is the default port if you don't type in anything in
your browser)
Reset all the settings of httpd.conf, httpd-ssl.conf
Then open httpd-vhosts.conf and put this:
<VirtualHost *:80>
DocumentRoot C:\xampp\htdocs\foobar
ServerName foo.bar
</VirtualHost>
Restart your computer (httpd-vhosts.conf doesn't take effect without)
The file hosts is fine as it is.

Resources