SOLVED: hosting a website

strellnikov
Posts: 14
Joined: Sat Aug 08, 2015 2:53 am

SOLVED: hosting a website

Postby strellnikov » Sat Dec 10, 2016 1:34 pm

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?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: hosting a website

Postby bigfoot65 » Sat Dec 10, 2016 2:33 pm

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

strellnikov
Posts: 14
Joined: Sat Aug 08, 2015 2:53 am

Re: hosting a website

Postby strellnikov » Sat Dec 10, 2016 4:46 pm

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>

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: hosting a website

Postby bigfoot65 » Sat Dec 10, 2016 4:49 pm

The redirect indicates a DNS issue.

Do all other apps work?
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

strellnikov
Posts: 14
Joined: Sat Aug 08, 2015 2:53 am

Re: hosting a website

Postby strellnikov » Sat Dec 10, 2016 5:06 pm

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?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: hosting a website

Postby bigfoot65 » Sat Dec 10, 2016 9:31 pm

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 39 guests