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

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 ?

Related

Accessing xampp vhost too slow when there is no internet

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

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

wordpress site working locally but not from the domain

My wordpress site is working locally in my wamp server, this is hosted on an ec2 instance and domain is maintained in Route 53\cloudfare. The domain is working when i checked it using mxtoolbox. The site was working and live till the time i changed my host file in the server. I removed the host file entries accidentally thinking it is a dev site, however i restored it but still the site is not working and i am getting only the "TOO MANY REDIRECTS" error. The following is the current windows host file details
#
127.0.0.1 localhost
::1 localhost
127.0.0.1 mydomain.com
::1 mydomain.com
I restarted the server and WAMP multiple times but it is not working.
The following is my virtualhost configuration
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>`
Clean your cache and browser history first, then try doing it below:
Open your wordpress admin panel --> Settings--> General --> Make sure it points to the correct domain. --> Save
Or go to the wp-config.php file (Try this if the first method fails / can't be accessed)
add:
define('WP_HOME','http://YourDomain.com');
define('WP_SITEURL','http://YourDomain.com');
or
Try to remove or rename default .htaccess
or
Try to disable the plugin (renaming the plugin folder in the "wp-content/plugin/plugin-folder-name" will non-active that plugin. This might solve the problem if the constraints are due to the plugin)
That's a number of ways when I resolve the ERR_TOO_MANY_REDIRECTS problem. Goodluck

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

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