'Public' in URL for Local Host is Okay?

Hi there,
Today I see posts stating ‘public’ should not be in URL on successful install of SuiteCRM 8+ but I think maybe this is okay if it’s only for a locally installed instance that is not online, is only accessed on the local machine/company internal network?

My URL is ‘localhost/suiteCRM/public/#/home’ and it is working fine.

Can someone clarify for me? And if I do need to change it provide instructions/link to instructions.
TY

Yeah, I have read in the posts that you need to update RewriteBase. I don’t know why :upside_down_face:

Hello @cswhs

I’m a big fan of using standard VPS / LAMP environment and adhering exactly to installation guide.
That goes for the document root as well:

It might be possible, that it’s partly working with the /public/ in the URL and some other parts are not working (or even everything is working with the RewriteBase).
Maybe there are some issue later on in some areas that you haven’t tested, yet?

I see a lot of issues here on the forums, which have nothing to do with SuiteCRM - just the server setup is wrong / odd / uncommon / ‘creative’. People run into all sorts of issues which are not SuiteCRM related and have to fix things which could be avoided in the first place.

What system are you running? Why do you not want to set the document root?
For local testing, I’ve got a VirtualBox and inside it, I’m running Ubuntu server with Apache.
That keeps my local / host system clean and I can test out multiple things on the VirtualBox and snapshots are incredibly easy and fast.

It’s true that this has security issues, but even if you’re not concerned about security because this is just a local test installation, still I don’t believe that your installation is working fine if you see public in the URLs.

I think eventually this will get you into trouble and some parts of the application will not work. There are complexities surrounding the web root of SuiteCRM due to the presence of a legacy application inside a newer application.

Hi there, Thank you for replies!
I do not want the app in public! I didn’t set it up that way on purpose. I have read thru the wikis everyone sent to me. It seems I need to check three different places and adjust.

mod-rewrite: I have confirmed that mod-rewrite is enabled via the .htaccess file and I checked it also via a graphql request. As per instructions wiki am I supposed to remove my crm name in the RewriteBase path line or is this fine since as it is and is working via graphql request? Here is how mine appears now:

RewriteBase /suiteCRM-8.6.1/public/legacy

Do I change it to /public/legacy?

vhost record: To check my httpd-vhosts.conf file in apache>conf>extra: this file contains only dummy data. Is this where I would add:

<VirtualHost *:80>

    DocumentRoot /suiteCRM-8.6.1/public
    <Directory /suiteCRM-8.6.1/public>
        AllowOverride All
        Order Allow,Deny
        Allow from All
    </Directory>

</VirtualHost>

config.php: In checking this also as suggested I see my site_url path as:

'site_url" => 'http://localhost/suiteCRM-8.6.1' ,

So based on wiki I think I would change that to ( is this correct?):

http://locahost/suiteCRM-8.6.1/public/legacy

I am very new to this and I am not making good sense of things yet. Please advise!
Also is there an order to which records to edit first? Which steps to take before another?
Thank you!

<IfModule mod_rewrite.c>
    Options +SymLinksIfOwnerMatch
    Options -Indexes
    Options -MultiViews
    RewriteEngine On
    RewriteBase /public/legacy

Hi rsp
I made this change to the .htaccess file but this didn’t resolve the public path. Can you be more specific regarding the other steps needed? Are there other files I need to change?

@BastianHammer could you please help cswhs with suitecrm 8.x config :smile:

Hello @cswhs

say, what server / Linux distribution / webserver do you use?
And you wrote:

apache>conf>extra

Maybe you’re using some admin interface, that could present some extra issues.

My vhost:

LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so

# Listen 443

<VirtualHost *:80 *:443>
    ServerName suitecrm86.demo
    DocumentRoot /var/www/suitecrm86.demo/public

    <Directory /var/www/suitecrm86.demo/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Order Allow,Deny
        Allow from All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/suitecrm86.demo_error.log
    CustomLog ${APACHE_LOG_DIR}/suitecrm86.demo_access.log combined

    SSLEngine on
    SSLCertificateFile /var/www/suitecrm86.demo/cert/server.cer
    SSLCertificateKeyFile /var/www/suitecrm86.demo/cert/server.key

</VirtualHost>

Other than that, I usually have one conf file per vhost - even there is only one domain on the server, I’d create a file accordingly:
domain.com.vhost.conf
Just to make it clear or easy.

And I haven’t changed anything in any SuiteCRM files.
Standard installation incl. permissions etc.

Hope that might shed some light.

You can try install using this:

1 Like

Hi Bastian,
I changed the vhost configuration as per your example which allowed the url to be just localhost (not longer with public in the path) but that caused the navigation panel at the top of the page to not load upon log in.

We tried other things troubleshooting that but with no luck. What else do we need to change/fix to load that nav panel?

Also to answer your other questions:
I am using SuiteCRM 8.6.1 on XAMPP. Have Windows11 machine. Running localhost only for now for trial.
I have changed things back to be able to access the program which is url localhost/suiteCRM-8.6.1/public/#/Login

I suggest not using Windows but Linux.
Win is not a supported system and you might experience all sorts of issues which are unrelated to SuiteCRM, but rather to your server setup.

Running a Linux in a VirtualBox is fairly simple and SuiteCRM runs out of the box.

However, the navigation not loading happens to be something that appears on the forums more often, due to wrong environments.
Often it’s related to:

If you need to keep your tech stack, try into that direction.
I can’t help much there, I’ve never tried SuiteCRM on Windows.
Still, I suggest to setup Linux - so that you can focus SuiteCRM and not server issues with unsupported systems.