Redirect /fog/management to root X.X.X.X
Hi - New to fog but been reading through a lot of the posts and can’t see a way to redirect fog landing page to the root http://x.x.x.x.
Note: This is a fresh install
Info: Running Ubuntu 16.04
Running Version 1.3.4
SVN Revision: 6066
@Wayne-Workman No worries, ya I am going to look at apache default config
@bluesky sorry about that.
Apache must be configured by default on Ubuntu to not look for an index.php ? That’s the only thing I can think of. I’m going to have to try it on Ubuntu 16 now and see.
Glad you got something working though. Linux is all about possibilities and freedom doing things your way!
@Wayne-Workman Please see my previous reply to you, you can see exactly what I did including the contents of the php file.
@bluesky I just tried the steps in the wiki verbatim and they work fine. I’m not sure what is wrong, are you replacing the x.x.x.x with the server IP address?
@x23piracy Thanks, this worked!
create a index.html in /var/www with the following content:
<meta http-equiv="refresh" content="0; URL=/fog">
@Wayne-Workman Hi Wayne - I just cant seem to get this to work following the instructions on wiki.
I have started with fresh install of Ubuntu 16 and FOG . I dont want to waste your time but thought I would provide the update.
1.) ls -l /var/www/html/index.php
-rwxr–r-- 1 root www-data 78 Feb 16 09:24 /var/www/html/index.php
2.) Contents of above file:
Latest Version: 1.3.4
Latest Development Version: 1.3.5-RC-7
Latest SVN Version: 6065
4.) Server Version: Apache/2.4.25 (Ubuntu) OpenSSL/1.0.2k
@Wayne-Workman Ok Thanks thats what I will do. Thanks for all your help. So far, I have FOG up and running in a school district…just now trying to tweak a few things
@bluesky I can assure you that the wiki article I posted does work. Others and myself have used it many times on many different OSs. Starting over is probably best since you’re just playing around with fog.
@Wayne-Workman I think I am going to start all over with fresh install. I am using virtual box so I can destroy and start over easily. I suspect I have touched to many files made to many config changes.
@Wayne-Workman No its not working, typing "X.X.X.X "into the browser takes me to the index of / page. interestingly enough if i type local host, it takes me to the Apache Debian default page then redirects me to the fog web console
@bluesky It’s not working?
@george1421 Thanks I have tried both your suggestions, but if you know this works, then I suspect I have issues with my apache2 service
this fails chown root:apache /var/www/html/index.php invalid group. should this be www-data?
Yep. In Ubuntu/Debian it’s www-data
I updated the wiki to reflect this.
@Wayne-Workman this fails chown root:apache /var/www/html/index.php invalid group. should this be www-data?
@bluesky Yeah, you should be using Wayne’s post. The index.html should work, but there may be some apache configs that need to happen. I was just shooting from where I know. The php solution that wayne posted does the same exact thing but via a php page.
This is what you should be doing: https://wiki.fogproject.org/wiki/index.php?title=Simple_Redirect
@george1421 Just confirming where the index.html should be. I have it in /var/www/fog/index.html. I tested this by just entering ip in firefox browser and it takes me to the index of / page.
This is what I do with CentOS7:
echo "Make Apache Default Web Page default to <servername>/ instead of <servername>/fog/" sed -i.bak "s|DirectoryIndex index.html|DirectoryIndex /fog/index.php index.html|g" /etc/httpd/conf/httpd.conf sed -i.bak "s|/management|/fog/management|g" /var/www/html/fog/index.php
The first part is in Apache’s documentation. The second part cinches the knot.