Problem with links (local - network)
Posted by: AndyPost (---.ip-addr.vsenet.de)
Date: November 05, 2018 04:22PM

Hi there,

I want to youse WAMP within our Network for serving some informations.
It's working fine when I use my Win10 Workstation - but when I try to access the virtual host from another Workstation within our network, I've a problem with linking to css and/or js files.

E.G.:
When I open a site locally (on that Workstation where WAMP is running) a link is like this:
http:// reports/assets/components/bootstrap_4.1/js/bootstrap.min.js
(made the spaces between http:// and url for a better overview)

When I open the same site from another Workstation the same link looks like that:
http:// 192.168.1.21/assets/components/bootstrap_4.1/js/bootstrap.min.js

My httpd-vhosts.conf:
<VirtualHost *:80>
ServerName reports
ServerAlias reports
DocumentRoot "c:/wamp64/www/reports"
<Directory "c:/wamp64/www/reports/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

I'm searching the internet since a few days - but I don't find a solution sad smiley

...what can I do?
What do I wrong?

Thanks for your help!



Edited 1 time(s). Last edit at 11/05/2018 04:28PM by AndyPost.

Options: ReplyQuote
Re: Problem with links (local - network)
Posted by: RiggsFolly (Moderator)
Date: November 05, 2018 05:11PM

The answer is you need to tell all the other PC's wher to find the domain `[reports]`

If you have a local/company DNS Server then that is the best place to get this domain added as every PC shoudl pick that up automatically (the once in your netweork that is)

Alternately you will have to edit the HOSTS file in all the PC's that want to access this site and add the domain to there.

Assuming the WAMPServer PC is on ip address 192.168.0.10 then add this to all other PC's (not the one running WAMPSevrer

192.168.0.10 reports
::1 reports

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Problem with links (local - network)
Posted by: AndyPost (---.ip-addr.vsenet.de)
Date: November 06, 2018 07:54AM

Thanks for your attention Riggs - I appreciate that!

Is there a way to configure Apache/Wamp that I could open the Website via http:// 192.168.1.21/reports
and load the included files correctly from the correct directory?
Now the included files have the following path:

http:// 192.168.1.21/assets/components/bootstrap_4.1/js/bootstrap.min.js

...this is needed:
http:// 192.168.1.21/reports/assets/components/bootstrap_4.1/js/bootstrap.min.js

...is there a way to rewrite this somehow?

Options: ReplyQuote
Re: Problem with links (local - network)
Posted by: RiggsFolly (Moderator)
Date: November 06, 2018 11:44AM

Did yo not try the HOSTS file amendment, or is that something you cannot do at your site without Admin permission?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.