Results 1 to 10 of 10
I can't seem to access my ROOT folder when I link to a file in it from one in var/ w ww.
if (my ip):80 links to va r / ...
- 11-07-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 25
Web Servers in Ubuntu
I can't seem to access my ROOT folder when I link to a file in it from one in var/ w ww.
if (my ip):80 links to va r / w ww, and jsp only works in tomcat / webapps /ROOT, and I have tomcat / webapps / ROOT installed in var / w ww, then I thought I would try to do something like this, to make my jsp work:
I tried using this:
orCode:file: / / / var / www/ tomcat/ webapps/ ROOT/ filename
What am I doing wrong?Code:(my ip) : 80 / filename
Is there a way to simply redirect webapps / ROOT to var / www and put all of the files there?
Similar/same problem with default-site directory in Apache2
- 11-08-2010 #2
- 11-10-2010 #3Just Joined!
- Join Date
- Nov 2010
- Posts
- 25
That's great as a command line
Thanks.
Looks like I would have to do that in a shell script for every single file and every time I reboot. I'm looking more for maybe some kind of environment variable, like the way JAVA-HOME is set, so that every file in the folder is redirected.
- 11-10-2010 #4
1- check if your web root is /var/www or /var/www/html
2 -
No. One time done, is done, and with ln -s you may soft link all dirrectories
3-
Apache aliases may be what your are looking for.
On /etc/apache2/apache2.conf (or on a file in /etc/apache2/conf.d/) you may set aliases
Exp:
Alias /mediawiki /var/lib/mediawiki
Then http://your_host/mediawiki will show files on /var/lib/mediawiki
Hope that helps
Luis
- 11-14-2010 #5Just Joined!
- Join Date
- Nov 2010
- Posts
- 25
I will try aliases, thanks
I found this link as well. I am sure it will be what I need. I would post it, but I haven't yet made 15 posts on this forum. The site is The Web Hosting Hero.
As for answering if my website was in var/ www/ or var/ www/ html, I don't have an html folder in that location.Last edited by EdCompSci; 11-14-2010 at 10:11 PM. Reason: less than 15 posts and tried to post a url
- 11-15-2010 #6
That's it, then
If you are new to apache, you may take a look at
$ cat /etc/apache2/sites-available/default
and see why your DocumentRoot is /var/www.
Also, if you install apache2-doc, you'll have the apache docs at http://your_host/manual - another alias, set in the file /etc/apache2/conf.d/apache2-doc.
...
Alias /manual /usr/share/doc/apache2-doc/manual/
Good luck
Luis
- 11-16-2010 #7Just Joined!
- Join Date
- Nov 2010
- Posts
- 25
Thanks, that's helpful
So then, with the default file in sites-avaailable, can I just change the path in there to my tomcat ROOT directory and put all of my files there?
- 11-16-2010 #8
I never installed tomcat, so I'll say yes, I guess.
I'll have to change
DocumentRoot /var/www
[...] and
<Directory /var/www/>
in the same manner
reboot apache, and see if it works
Note site-available and site-enable dirs are designed for multi site configuration, what apache call virtual hosts, as you may have already see.
If you are just running one site, you don't need to do anything more, just use the default file.
Any way, vhosts are enabled/disabled with a2ensite or a2dissite, like a2enmod and a2dismod commands for mods. It just creates/removes symlinks on the enable dir.
Good luck
Luis
- 11-18-2010 #9Just Joined!
- Join Date
- Nov 2010
- Posts
- 25
Hey that worked
I guess though, that's not what I needed to do to get my jsp to work. All the code still displays on the page instead of the actual page content displaying. Must have something to do with my J2EE configuration.
Thanks though, now I, and I guess you too, know that does work.
- 11-30-2010 #10Just Joined!
- Join Date
- Nov 2010
- Posts
- 25
Is this on subject?
* Admin Edit: hello Ed, I've removed the quoted post you had here because that post has been deleted and the user banned because it was spam only, so in answer to your question, no it wasn't on subject. Just wanted to let you know what happened with that part of your post.
Anyway, I just reinstalled my Jaunty upgraded to Maverick with just straight Maverick and am starting over. I think I'll just install Glassfish and see what I can do.Last edited by oz; 12-02-2010 at 03:45 AM.


Reply With Quote
