polterguy / phosphorusfive

A Full Stack RAD Web Application Development Framework
https://gaiasoul.com
GNU General Public License v3.0
178 stars 36 forks source link

Bazar not found on fresh install (Ubuntu install script). #18

Closed mobile999 closed 7 years ago

mobile999 commented 7 years ago

http://<domain/ip address>//bazar is not found after login on fresh install using the Ubuntu install script.

polterguy commented 7 years ago

Darn it, did you use the latest version? The 4.1 version that is? Your example URL seems to be domain/IP-addr/bazar. It should normally be only domain/bazar. Have you setup your web server to use some alternative port or something ...?

Could you tell me more about your configuration, such as if you used a fresh Ubuntu Server, latest version (16.04), followed the default installation, installed it on a VirtualBox, etc. Hopefully that will help me reproduce it locally for myself ...

The URL, yet again, should only be "domain/bazar". Does the main landing page load? If it does, and you add "/bazar" at the end of it, does the Bazar load?

Did Micro install (as in, does your website display icons at the main landing page) Micro is automatically downloaded after you setup the server-salt, and create your root password. If it didn't install, there might be something wrong with your server's DNS settings ...

The more info you could provide, about platforms and configuration, the more I'd be able to help ...

mobile999 commented 7 years ago

Yes, latest install.sh with https://github.com/polterguy/phosphorusfive/releases/download/v4.1/binarie s.zip.

http://<domain/ip address>/bazar = http://domain/bazar or http://ipaddress/bazar.

Also not working: https://domain/bazar https://ipaddress/bazar

The webserver (apache2) is using default ports (80/443).

This is a fresh 16.04 64-bit install using the netinstaller (mini.iso). Basic installation with xubuntu desktop. on a real machine. There's an option to install "Basic ubuntu server" (not installed).

Main landing page loads and looks like https://youtu.be/_nFebKPjA3Y?t=182 exept the bazar icon is on top left. I'm guessing Micro installed. Clicking on bazar results in a 404 not found.

sudo ls /var/www/html/modules/micro/ LICENSE media README.md samples screenshots startup startup.hl

polterguy commented 7 years ago

It sounds like everything works, except the URL resolver, which means we've pinned it down to only a few possibly things that might go wrong. Could you check your mod_mono_auto.conf file for me, it should be easily found with the following;

sudo nano /etc/apache2/mods-enabled/mod_mono_auto.conf

At the bottom of that file, there should be the following code.

<FilesMatch \"^[^\.]+$\">
    ForceType application/x-asp-net
</FilesMatch>
<Files ~ \"\.hl\">
    Order allow,deny
    Deny from all
</Files>
<Location \"/users\">
    Order allow,deny
    Deny from all
</Location>
<Location \"/common\">
    Order allow,deny
    Deny from all
</Location>

If the file doesn't exist (empty nano), this means your mod_mono_auto.conf is located somewhere else, for some reasons, which might explain it. If the file only contains the above parts, your actual mod_mono_auto.conf is also probably located somewhere else. All parts from the above configuration is important, but the thing I suspect is missing, is the first <FilesMatch ... part, which forces all URLs without a period to be mapped to the x-asp-net module.

Alternatively, did you run the install.sh script on a "virgin" machine, or did you have something else on it from before.

Does the bazar folder file actually exist? Which you can check with the following.

sudo ls /var/www/html/modules/bazar
mobile999 commented 7 years ago

This install is a bare minimum + "ubuntu-standard" + "xubuntu-desktop". You can see what is installed here (including "recommends"-packages):

https://packages.ubuntu.com/trusty/ubuntu-standard https://packages.ubuntu.com/trusty/xubuntu-desktop

The install script had a few errors so I had to fix them manually. This was modifying the web.config and mod_mono_auto.conf files.

mod_mono_auto.conf checkup:

sudo cat /etc/apache2/mods-enabled/mod_mono_auto.conf MonoAutoApplication enabled AddType application/x-asp-net .aspx AddType application/x-asp-net .asmx AddType application/x-asp-net .ashx AddType application/x-asp-net .asax AddType application/x-asp-net .ascx AddType application/x-asp-net .soap AddType application/x-asp-net .rem AddType application/x-asp-net .axd AddType application/x-asp-net .cs AddType application/x-asp-net .config AddType application/x-asp-net .dll DirectoryIndex index.aspx DirectoryIndex Default.aspx DirectoryIndex default.aspx <FilesMatch \"^[^\.]+$\"> ForceType application/x-asp-net </FilesMatch> <Files ~ \"\.hl\"> Order allow,deny Deny from all </Files> <Location \"/users\"> Order allow,deny Deny from all </Location> <Location \"/common\"> Order allow,deny Deny from all </Location>

Bazar checkup:

sudo ls /var/www/html/modules/bazar bazars configuration download-app.hl install-app.hl README.md startup.hl cache desktop.hl fetch-apps.hl launch.hl screenshots

polterguy commented 7 years ago

Let me try to reproduce it, by installing the same configuration within a virtual box on my own machine. I'll be back soon.

polterguy commented 7 years ago

Could you paste in your current install.sh script here, for references BTW, such that I could check up your changes ...?

polterguy commented 7 years ago

Hehe, sorry, I can actually see your error here ... :) It's quite easy in fact, try to modify your mod_mono_auto.conf file to contain the following.

MonoAutoApplication enabled
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx
<FilesMatch "^[^\.]+$">
    ForceType application/x-asp-net
</FilesMatch>
<Files ~ "\.hl">
    Order allow,deny
    Deny from all
</Files>
<Location "/users">
    Order allow,deny
    Deny from all
</Location>
<Location "/common">
    Order allow,deny
    Deny from all
</Location>

Basically, your backslashes in the mod_mono_auto.conffile are not supposed to be there, but only in the invocation to echo, to allow for appending " (double quotes) into the file. echo requires a string, which is encapsulated by double quotes ", which means if you want to actually echo double quotes into your file, you'll need to escape them, with a backslash.

Hence the output that echo is to be creating, should be for instance <FilesMatch "^[^\.]+$"> - However, to accomplish this, the " needs to be "escaped".

Sorry for giving you, what you probably find to be a "too thorough" explanation, but I intend to use these issues as FAQs later. Hence, writing my answers out, as if I would do to my "grandma" is kind of a pre-requisite for facilitating for such ...

One question though, why did you have to change the install.shscript, or modify the web.configand mod_mono_auto.hl files manually? Which errors did you encounter ...?

mobile999 commented 7 years ago

There might be errors here since I have edited the script after the installation:

https://paste.ubuntu.com/25388178/

polterguy commented 7 years ago

Awesome, you're obviously pretty skilled in bash. Some of your ideas, are better and more concise than mine arguably. Would it be OK if I "borrowed" some of your ideas ...?

I like your check for [N/y] for instance ...

In addition, I see how your apt-get invocation installs everything in a single invocation, which is cool I think. In addition I like your improved chown invocation, which removes the explicit chown invocation to the .gnupg folder, etc ...

However, my guess is that your mod_mono configuration should probably be changed into the following.

# Configuring mod_mono
cat << EOF | sudo tee -a /etc/apache2/mods-enabled/mod_mono_auto.conf 2&>1
<FilesMatch "^[^\.]+$">
    ForceType application/x-asp-net
</FilesMatch>
<Files ~ "\.hl">
    Order allow,deny
    Deny from all
</Files>
<Location "/users">
    Order allow,deny
    Deny from all
</Location>
<Location "/common">
    Order allow,deny
    Deny from all
</Location>
EOF

Are there any reasons you changed these parts of the script ...?

polterguy commented 7 years ago

However, obviously, after running the "failed" script, re-running it on the same server won't work, since it's added "bad data" to your mod_mono_auto.conf file at this point, and you'll have to explicitly remove the redundant " by hand, as I wrote in my above answer, using e.g. nano ...

polterguy commented 7 years ago

For the record, restart Apache after having applied the above changes to your mod_mono_auto.conf file, using e.g.

sudo service apache2 restart

Yet again, sorry for spoon feeding you, but as I said, others (which are possibly less competent) might read this in the future ...

mobile999 commented 7 years ago

I already started a fresh install so I will be able to try the install script with your modification.

polterguy commented 7 years ago

Awesome, keep me in the loop :)

polterguy commented 7 years ago

I am going to assume you solved your problems, and close this one. If you still are having problems, feel free to reopen it again.

Have a nice one :)

.t

mobile999 commented 7 years ago

Modifying mod_mono_auto.conf didn't work in the previous version of the script. That's why I modified that part. (You asked about this.) Also the sed command needed sudo.

I noticed you changed the install script and removed all the sudo'es. That solved these problems.

Doing a sudo bash install.sh gave me problems. Apt-get did not like that when installing mysql-server. What a waste of time I spent troubleshooting that issue.

Here is the script I used to successfully install p5 on a fresh ubuntu installation: http://paste.ubuntu.com/25390058/

Feel free to use any ideas from that script.

Your script also works now since you have removed sudo.

polterguy commented 7 years ago

Awesome, thx. I removed the sudo parts, since it doesn't work on other Debian based systems, which mostly requires su, instead of sudo. Hence, when evaluating the script as a whole, the idea is that it needs to be done within the context of root, whatever that means for the system the installer is on ...

Keep me posted if you find other issues, and/or feature request :)

polterguy commented 7 years ago

Howdy, if you'd like to test something for me, I'd love it if you tried following this recipe to upgrade. There are some cool new features, most importantly better creation of PGP key pairs, in addition to "Peeples", a module for adding more users to your installation.

Be warned though, it deletes all files from your previous installation. So if you've done some changes, such as e.g. editing your "web.config" etc, you might want to take a backup of your existing files before you start out ...

PS! You cannot upgrade neither Sephia Five nor install Peeples without the new "core", since it relies upon some things not existing in the previous stable release ...

Let me know how it's going if you do this :)

mobile999 commented 7 years ago

It seems to upgrade with your install script without errors except I don't have a welcome icon on the landing page after login.

Also it's a bit hard to see where to write text (lines around boxes), where to click on radio buttons and to put checkmarks. The colour on the lines need more contrast.

Payment needs pricing before logging into paypal.

polterguy commented 7 years ago

Thx, the "Welcome" link is actually just a simple little app, i exclusively created for use on my own server, which simply does the following.

p5.web.echo-file:"/some-html-file.html"

It's not really an "app", just an icon, loading a static HTML page ... I could send you its code though, if you want it, but it really kind of does nothing ... You can find it here though ...

It was simply created to allow people to visit "my box", to create a feeling for John Doe that this can be running on an old laptop, out of his living room (which my box is in fact) at https://home.gaiasoul.com - Plain standard internet connection, leading to an old discarded laptop, inside of my living room in fact ... ;)

The contrasts I will definitely write on my TODO. For the record, if you go into Sephia Five's settings, on the first tab, you can actually choose between 5 different skins. I personally think at least 3 of them #$%& - But the "Sea Breeze" and "Serious" skins aren't "too bad" though ... Serious is the default, which is probably the one you think has too little contrast ...

I'll take your feedback with me, into the next release. I also have other issues with the serious skin anyways, so I'll have to take a closer look at it anyways ...

Pricing I agree with, though I do give quantum discount, according to how many licenses are purchased at once. So it would provide a challenge, updating this on the fly, as the user selects different quantities. But I definitely see why this is important ...

I'll write both of these down. Thank you for valuable feedback ... :)

polterguy commented 7 years ago

Out of curiosity, what do you think about the price? €10 per user beyond 5 for "Home/private/non-professional user". With discounts starting at 15 users (5%) all the way to 50% off for 500 users (€5 per user that is for 500 tickets)

And 5 times as much for "corporate users".

Do you think my prices are accurate, and that this is something people would be willing to pay ...?

Hint, apps are in general free, and File Sharing is on my TODO ... ;)

In addition to Publishing (CMS) ...

Plus lots of other good ideas ...

There's also this too ...

Are my prices far fetched, bulls eye, or somewhere in between ...?

If you were sys-admin for a medium sized corporation, do you think your manager would pay this ...?

mobile999 commented 7 years ago

I'm very bad at evaluating pricing in general. You are asking the wrong person.

polterguy commented 7 years ago

Thx anyways :)

polterguy commented 7 years ago

PS, I'd just like to provide some feedback for you. I have increased the contrast of textboxes, radiobuttons, checkboxes, etc now, pretty significantly. I will also make sure the price is shown before one visits PayPal. But I don't think there'll be a release immediately, since I need to do some other things first - Most importantly, create a build script, since the steps to create a build, is far too complex at the moment, and prone to errors when creating one manually.

polterguy commented 7 years ago

Hurr, hurr