Point my default location to a subdirectory
Posted by: seanfilidis (---.cable.dynamic.v4.ziggo.nl)
Date: March 08, 2018 08:44AM

Hey there,

I've made my WAMP installation accessible on my local network. Other devices can navigate to 192.168.178.185/wordpress to see my project.

However, I would like other devices to access my project by simply navigating to 192.168.178.185 without specifying the subdirectory.

How can I set this up? Should I use a port (something like 192.168.178.185:8080) for this? How does that work?

My current vhosts.conf looks like this:

# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

#
<VirtualHost *:80>
ServerName wordpress
DocumentRoot "c:/wamp64/www/wordpress"
</VirtualHost>

<Directory "c:/wamp64/www/wordpress/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
Require ip 192.168.178
</Directory>

Thanks guys

Options: ReplyQuote
Re: Point my default location to a subdirectory
Posted by: RiggsFolly (Moderator)
Date: March 08, 2018 10:33AM

Hi

Have a read on this, I am assuming you are talking about phones and tablets.

[stackoverflow.com]

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Point my default location to a subdirectory
Posted by: seanfilidis (---.cable.dynamic.v4.ziggo.nl)
Date: March 09, 2018 08:05PM

This was somewhat helpful. What I really want to do is access my project from outside my network, i.e., make it available on the internet.

I added the following two lines to httpd.conf
Listen 0.0.0.0:8080
Listen [::0]:8080

And added this to httpd-vhosts.conf
<VirtualHost *:8080>
ServerName wordpress
DocumentRoot "c:/wamp64/www/wordpress"
<Directory "c:/wamp64/www/wordpress/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Then I set my router to port forward to my computer.

Now when I type my public IP address:8080 into a device on another network, I get the message
Forbidden
You don't have permission to access / on this server

And if I type my public ip address:8080/wordpress, I get
Forbidden
You don't have permission to access /wordpress on this server.

What else am I missing?



Edited 1 time(s). Last edit at 03/09/2018 08:05PM by seanfilidis.

Options: ReplyQuote


Sorry, only registered users may post in this forum.