Turns out some things have changed so here is my walkthrough (long wall of text with tons of steps) of what I experienced and how I solved the issues that arose, in case someone is running into same issue or if I need to do this again:
- Download & install latest WAMP-server for Win64 (as of today, that is: (64 BITS & PHP 5.4) 2.4)
- Launch wamp-server, LMB on icon and press "Put Online" and test "localhost" in browser (no response)
- Turns out port 80 is being used by skype, try to kill skype and try again (make sure it is working)
- Change port of wampserver to use 8080
- WAMP-icon/LMB/apache/httpd.conf
- Change "Listen 80" to "Listen 8080"
- Change ServerName-line to "ServerName localhost:8080"
- Restart Service
- Test again with http://localhost:8080/ (make sure it is working)
- Now next part, accessing a folder on server
- create a file in wamp-www-folder "c:\tools\wamp\www\temp\foobar.txt"
- should be able to navigate to it by typing "localhost:8080/temp/" in browser
- And finally, access the file through an IP-address (so you can access it from other device on your network)
- WindowsKey/cmd.exe/
- ipconfig <enter> (my ip is 10.20.201.75)
- Enter that IP into browser such as http://10.20.201.75:8080/temp/
- For me this resulted in an error with "you do not have permission to view this folder"
- Go into WAMP-icon/LMB/apache/httpd.conf
- Change <Directory "c:/tools/wamp/www"> ... </Directory> into:
<Directory "c:/Tools/Wamp/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory> - (Basically it seems like all Allow-lines was changed in Apache 2.4 and thus they should be replaced by the Require all granted-line)
- At this point all should be working after a restart, but it wasn't for me, the apache-service stopped responding WAMP-icon/LMB/apache/service/"could not start service even after clicking on it several times) and there were no logs in apache_error.log.
- Windows-key/cmd/
- cd "C:\Tools\wamp\bin\apache\Apache2.4.4\bin\"
- httpd -t (will check configs to see if there is an error in a file, turns out I had an error in httpd.conf-file on a specific line which was reported by this command)
- Fixed issue in file and restarted service, working as intended
- You can also open TaskManager (ctrl+shift+escape)
- Services/wampapache and check status, for me it was stopped, which lead me to use the "httpd -t"-command
- Good Game - I win (finally able to download a file through console from a http-address)
Inga kommentarer:
Skicka en kommentar