Difference between revisions of "Simple Redirect"
(Created page with " Normally, to get to the FOG web interface, you have to type <pre>x.x.x.x/fog/management</pre> This works fine, but if FOG is the '''only''' thing your Linux box is running, ...") |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
− | |||
On your FOG server, we will create a file called index.php using vi. | On your FOG server, we will create a file called index.php using vi. | ||
Line 12: | Line 11: | ||
<pre>vi /var/www/html/index.php</pre> | <pre>vi /var/www/html/index.php</pre> | ||
− | + | Instructions on using Vi: [[vi]] | |
− | <pre><?php header('Location: http://x.x.x.x/fog/management/index.php'); ?> | + | In here, you'd write (or copy/paste) this: |
− | + | ||
+ | <pre><?php | ||
+ | header('Location: http://x.x.x.x/fog/management/index.php'); | ||
+ | exit; | ||
+ | ?> | ||
+ | </pre> | ||
Save this file. | Save this file. | ||
+ | |||
+ | Permissions on this file should be set as: | ||
+ | |||
+ | <pre> | ||
+ | chmod 744 /var/www/html/index.php | ||
+ | #If CentOS, Fedora, or RHEL: | ||
+ | chown root:apache /var/www/html/index.php | ||
+ | #If Debian or Ubuntu: | ||
+ | chown root:www-data /var/www/html/index.php | ||
+ | </pre> | ||
Now, when you go to x.x.x.x you'll be taken to the FOG login screen! How cool is that?!? | Now, when you go to x.x.x.x you'll be taken to the FOG login screen! How cool is that?!? | ||
− | |||
− |
Latest revision as of 01:14, 16 February 2017
Normally, to get to the FOG web interface, you have to type
x.x.x.x/fog/management
This works fine, but if FOG is the only thing your Linux box is running, you can simplify this with a redirect so that simply typing the x.x.x.x into a web browser takes you to the FOG login page.
On your FOG server, we will create a file called index.php using vi.
vi /var/www/html/index.php
Instructions on using Vi: vi
In here, you'd write (or copy/paste) this:
<?php header('Location: http://x.x.x.x/fog/management/index.php'); exit; ?>
Save this file.
Permissions on this file should be set as:
chmod 744 /var/www/html/index.php #If CentOS, Fedora, or RHEL: chown root:apache /var/www/html/index.php #If Debian or Ubuntu: chown root:www-data /var/www/html/index.php
Now, when you go to x.x.x.x you'll be taken to the FOG login screen! How cool is that?!?