Page 1 of 1

SOLVED: hosting a website

Posted: Sat Dec 10, 2016 1:34 pm
by strellnikov
i am trying to bring up my website on amahi 9. I have followed the instructions on wiki "hosting a website" and did the port forwarding. the first time i did this i was able to bring up the site. since then i have deleted and recreated and now when i try to access my website i am redirected to my amahi control panel. any suggestions on what i should be checking?

Re: hosting a website

Posted: Sat Dec 10, 2016 2:33 pm
by bigfoot65
You might want to restart the web server or HDA:

Code: Select all

sudo systemctl restart httpd
Might also consider restarting the tutorial from the beginning.

Re: hosting a website

Posted: Sat Dec 10, 2016 4:46 pm
by strellnikov
i have deleted and restarted twice. once with a different appname and the last time with the original. as i said the first time i set up the website it came up fine including accessing MYSql db now it just redirects to amahi control panel.

conf.d file

<VirtualHost *:80>

ServerName ourwebsite
ServerAlias bradandtiffany.me
ServerAlias www.bradandtiffany.me





DocumentRoot /var/hda/web-apps/ourwebsite/html

<Directory "/var/hda/web-apps/ourwebsite/html">
Options Indexes FollowSymLinks MultiViews
<If "-s '/var/hda/web-apps/ourwebsite/htpasswd'">
AuthType Basic
AuthName "User Login Required for This Area"
AuthUserFile /var/hda/web-apps/ourwebsite/htpasswd
Require valid-user
</If>
<Else>
AllowOverride AuthConfig
Require all granted
</Else>
</Directory>

ErrorLog /var/hda/web-apps/ourwebsite/logs/error_log
CustomLog /var/hda/web-apps/ourwebsite/logs/access_log combined env=!dontlog

</VirtualHost>

Re: hosting a website

Posted: Sat Dec 10, 2016 4:49 pm
by bigfoot65
The redirect indicates a DNS issue.

Do all other apps work?

Re: hosting a website

Posted: Sat Dec 10, 2016 5:06 pm
by strellnikov
this has been resolved, mostly. i rebooted HDA, then rebooted router. The aliases work but the appname - ourwebsite - still takes me to the control panel. That in itself is not a problem since the alias is the purchased domain name. However you indicated a redirect problem and that concerns me. Can you elaborate?

Re: hosting a website

Posted: Sat Dec 10, 2016 9:31 pm
by bigfoot65
However you indicated a redirect problem and that concerns me. Can you elaborate?
The issue with the internal link resolving I believe is due to your server alias not being correct.

There should be a line:

Code: Select all

ServerAlias ourwebsite.bradandtiffany.me
if that is your internal domain.

You can compare to other .conf files in the /etc/httpd/conf.d directory for installed apps.

I will mark this one as resolved as you indicated it's working.