Current time: 12-19-2017, 12:25 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
installing below doc root
05-18-2012, 05:52 AM
Post: #1
installing below doc root
is there a way to modify the settings to use a subdirectory of document root? ie if my doc root is /var/www and i have webpagetest in /var/www/webpagetest what file(s) would i have to modify?
Find all posts by this user
Quote this message in a reply
05-19-2012, 01:08 AM
Post: #2
RE: installing below doc root
No, right now there are too many paths in the code that are absolute so it isn't possible. It's been on my list to look at for a while but it hasn't happened yet.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-30-2012, 07:46 PM (This post was last modified: 07-30-2012 07:46 PM by braincracking.)
Post: #3
RE: installing below doc root
Hi

I also wanted to install WPT in a sub-directory and spent many hours to modify the source code. It mostly works for the pages I'm used to see, but I think a 2nd view could find 404

Features :
- the sub-directory is configured via settings.ini
- default to empty string
- should not conflict with $GLOBALS['cdnPath']
- probably 90% of all the urls are now prefixed with $GLOBALS['basePath']

Missing / Dangers :
- tested only the pages I need to see, but that should cover most of the
- Works For Me© : tested on 2 different servers for now, but never tested anywhere else
- CSS are not dynamic so the sub-directory is hardcoded. I did not took the time to re-generate them via PHP, but that's what should be done
- tried to have all rewrite rules to be relative instead of absolute
eg: RewriteRule ^result/([a-zA-Z0-9_]+)$ ./result/$1/ [R]
It mostly worked but at the end I finally had to turn off HTTP_MOD_REWRITE to have all work fine
- should probably better use a makeURL() function rather than just prefixing strings

So, the time-consuming code is made, but lacks more testings on other environments
Do you want to try to merge this version with the HEAD ? How do you want me to provide the code ?

Jean-pierre VINCENT
braincracking.org
Fork of WPT monitor private instance : https://github.com/jpvincent/WPT-server
Find all posts by this user
Quote this message in a reply
08-01-2012, 04:43 AM
Post: #4
RE: installing below doc root
If you can send me a patch/diff against the HEAD I can look it over, merge the changes in and see if I can track down any cases where it isn't handled.

Sorry it's scattered all over the place, it sort of grew over 5 years and hasn't been refactored since.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-01-2012, 07:23 PM
Post: #5
RE: installing below doc root
The fact this project exists is good enough Smile

please find attached the .patch file ( diff -wupr )
The file was renamed as .txt to pass the forum submit form


Attached File(s)
.txt  urlRewrite.txt (Size: 135.83 KB / Downloads: 143)

Jean-pierre VINCENT
braincracking.org
Fork of WPT monitor private instance : https://github.com/jpvincent/WPT-server
Find all posts by this user
Quote this message in a reply
08-03-2012, 12:57 AM
Post: #6
RE: installing below doc root
Awesome, thanks. I'll go through it and merge. It will probably be a few days before I get to it bu much appreciated. I may see if I can refactor them all to use a central function while I'm in there.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-19-2012, 05:42 AM
Post: #7
RE: installing below doc root
Is there any update on running webpage test under a subdirectory?
Find all posts by this user
Quote this message in a reply
12-19-2012, 06:48 AM
Post: #8
RE: installing below doc root
Umm, the update is that I haven't done any work on it yet but hopefully in the next quarter or so I will be able to tackle it. It's mostly just grunt work going through all of the code and changing any absolute URLs.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)