Install/deploy/run Symfony 4 on shared hosting - deployment

I'm pretty new to Symfony and looking for a way to make it useful on our shared hosting environment. We want to create a small api, but first we want to see if we get SF4 to work on our shared environment.
I have an SSH account and they opened a port for us.
First of all I create a new project:
composer create-project symfony/skeleton sf
Secondly I install the server:
composer require server
At last I start the server:
./bin/console server:run *:3000
After this I receive a message everything is running:
[OK] Server listening on http://0.0.0.0:3000
// Quit the server with CONTROL-C.
PHP 7.1.3 Development Server started at Mon Jan 22 19:41:50 2018
Listening on http://0.0.0.0:3000
Document root is /home/MyUser/public_html/testapp/sf/public
Press Ctrl-C to quit.
When I browse to my http://my-url:3000, the page doesn't load.
Has anyone a solution for me?
Thank you!

I changed the setup so I don't need to start the server.
See Symfony 4 404 Page not found on all routes except root

Related

Unable to add remote node in Rundeck 4.9.0

Following the doc from Rundeck, however the only button I have under "Sources tab" is "ResourceModelSource"
When I click that button I get a blank
PPS Issue happened on previous version - new to RunDeck, so I can't say that it EVER worked
I tried adding a manual resouces.xml in the project director y(Which I had to manually create, which tells me that's another issue) and reloading RD but that did not seem to work
While it's not the likely cause, I'll mention it here incase it IS relevant, I'm hosting on port 4440 however I'm using nginx to forward http (not https) requests on 443 to 4440, this is due to corp net sec policy.
I'm sure it's something where it's having an i/o issue on the local host, however I'm not seeing anything in the logs.
That is a known issue when you have Rundeck installed behind a proxy server, take a look at this: https://github.com/rundeck/rundeck/issues/6278 the solution is to set the grails.ServerURL (rundeck-config.properties file) with the exit URL defined for Rundeck in your proxy server (e.g: grails.serverURL=http://my_domain/rundeck), then restart the Rundeck service.

How to open an EJS file with Live Server

I have a Server App created with Nodejs using "ejs" view engine.
When I start the Server and is running on the port, I click the URL and it sends me to my APP with no problem.
When I try to do it with Live server is when I am facing issues.
In Live Server instructions says: [NOTE: In case if you don't have any .html or .htm file in your workspace then you have to follow method no 4 & 5 to start server.]
That is what I do and I get redirected to, please see image below:
Could any one help me with this issue, please ?
Thanks
You can see it here
i wrote app.listen(3000);
thats mean i can access from 3000 port on my browser.
like this.
Just write to your server.js "localhost:(your-port)"
and you are ready to go

How come Netlify CMS on localhost is not working?

I’m from Taiwan and not good at English, but I’ll try my best to explain my question.
I use Netlify CMS to build my Hugo website.
Everything runs well, but when I want to change and check if the CMS’s configuration and style is okay, I always need to push my repository to Github, which is disturb me a lot.
So I tried to use local_backend: true in admin/config.yml, then used this command: npx netlify-cms-proxy-server.
then the window showed:
info: Netlify CMS File System Proxy Server configured with C:\Users\june.wu\Documents\GitHub\house-blog-hugo-cms
info: Netlify CMS Proxy Server listening on port 8081
It looked it ran successfully on localhost:8081.
But when I type localhost:8081 in browser it showed: Cannot GET /
How can I solve this problem?
I can confirm what said in the previous answer. Run npx netlify-cms-proxy-server and go to localhost:8080/admin or try also localhost:8080/admin/ (with ending slash). It should work if you are using default 8080 port.
Ignore that CMS is on port 8081 as said in the script log
for anyone looking at this in and still finding it unclear, as said in the docs you need to go to your regular development server based on the SSG (static site generator) that you are using once you have started both the NetlifyCMS and SSG dev servers. See point 5 in the beta features docs here.
You are not supposed to try visit the NetlifyCMS 8081 default port to use the CMS locally.
I have also seen behaviour mentioned by a few people that it only works with a / at the end of the path. So for example if using Astro as your SSG (which uses the port :3000 for it's dev server) you should try both:
http://localhost:3000/admin/
http://localhost:3000/admin
Although I have been having issues with the NeltlifyCMS dev server with Astro still...

My Dovecot and Postfix server on Ubuntu not working

I recently started renting a Ubuntu 18.04 VPS from DigitalOcean. The intent was to run a cheaper email system instead of alternatives like GSuite and Microsoft Business for me and a fellow developer, and split the costs. I've setup very basic email servers before, but in this case, since we both have our own domains and users, using virtual domains/virtual users is a must.
I followed a tutorial here, but my server won't let me connect. When I try viewing logs in any sort of way, everything seems fine. Entering the command tail -f /var/log/syslog | grep dovecot, then monitoring the results as I try and log in only produces this:
Sep 29 03:11:16 MEMail dovecot: imap-login: Login: user=<sysadmin#meproduction.org>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=28028, secured, session=<lUrg7Pl2ls9/AAAB>
Sep 29 03:11:16 MEMail dovecot: imap(sysadmin#meproduction.org): Logged out in=44 out=870
That's all the logs I was able to find. /var/logs/mail.log was empty, and postfix doesn't seem to show anything what-so-ever. When I try and login via SquirrelMail, CloudFlare ( my NameServer ) shows a page saying a 502, but only if I login to a valid account. Entering an invalid user just says that my login is incorrect, as you'd expect.
What logs am I missing, or maybe steps the tutorial messed up that you see? I would like to get the email system running ASAP, because I don't want to setup anything else until it's done, and some things require it ( like adding a spam filter, and S/MIME, and adding all those extra DNS and SSL features for security ).
I did find an answer. Apparently the tutorial I followed must've been formatted incorrectly, or done something wrong. After reverting my VPS, and following a different tutorial, I was able to set it up. If anybody else is trying to setup something like I did, follow this tutorial from DigitalOcean. I recommend looking firstly for tutorials from them, as they're usually well made and work well.

GlassFish 3.1 won't start from Eclipse

I'm using Linux, and I've installed GlassFish 3.1 outside of Eclipse. It starts fine with asadmin start-domain.
In Eclipse Helios I've installed the latest version of the GlassFish tools, server adapter etc. I've added a "Server" instance for my external GlassFish, but when I try to start it, the Eclipse Console says "Waiting for domain1 to start ......" – more and more dots are printed while I wait for several minutes. Eventually there's a dialog saying "Server GlassFish 3.1 at localhost failed to start."
At no point is http://localhost:8080 responding.
There is no other errors messages that I can find. The server log (glassfish/domains/domain1/server.log) prints the long startup command, and then:
Feb 28, 2011 10:48:45 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 3 msec.
The GlassFish installation is entirely stock, with no applications loaded. It works fine when started from the command line outside of Eclipse.
I've tried to reinstall GlassFish to different locations, I've reinstalled Eclipse with no plugins except the GlassFish stuff.
The strange thing is that the "Internal GlassFish 3.1" server, which is distributed with the Eclipse plugin and lives inside eclipse/plugins, works just fine and starts up very snappily. But I'd really like to have an external GlassFish that I can easily run independently of Eclipse when I want to.
Help much appreciated!
You can have detailed logs about what is going on :
go to "Window -> Preferences -> Glassfish Preferences".
There you can check the "Start Glassfish Enterprise Server in Verbose Mode".
I had problems starting Glassfish 3.1 from inside eclipse too.
I tried to delete the "osgi-cache/" subdirectory located in the domain directory and then i could successfully launch glassfish.
Hope it helps.
CLI130 Glassfish Error and Port 4848 in Use Error
Glassfish is written in Java and if the system's TCP/IP configuration isn't setup a certain way, Glassfish will choke when it makes a getLocaHost() call. A quick fix is:
Get the system's hostname and related IP
hostname
ifconfig -a
Add a line to /etc/hosts after the localhost line:
hostname ip-address-of-hostname
A Little More Background.....
If the local hostname (value returned from the "hostname" command) does not resolve to an IP address (e.g. "nslookup my-hostname") Glassfish will fail. The following Java app will expose this:
import java.net.*;
class Testnet {
public static void main() throws Exception {
InetAddress host = InetAddress.getLocalHost();
System.out.println ("host=" + host.getHostName());
System.out.println ("addr=" + host.getHostAddress());
}
}
The root cause could be any one of a number of issues:
The Local hostname (value returned from "hostname" command) does not resolve to an IP or valid IP
Misconfigured /etc/nsswitch.conf or /etc/hosts
There have been suggestions on the web that IPV6 only addressing messes up Java in Linux. To make sure this won't befall you, it can be set on most flavors of Linux with the following command (however the above Testnet app ran for us with bindv6only set to both 1 and 0):
sysctl -w net.ipv6.bindv6only=0
In terms of HA, having an entry for the local IP and hostname in /etc/hosts is a solid thing to do and to make sure "files" is the first entry in the list for "hosts" in /etc/nsswitch.conf. The downside to this is that each host needs to be setup with this line and it could cause problems with nodes that get their IP from DHCP or are randomly assigned when configured.
I've met the same problem as I was learning java web programming, but in netbeans - windows env. I've spent much time guessing what that error could mean because the log file wasn't clearly saying that.
Finally I found out that glassfish v3 was trying to run on 8080 port, which was already occupied by reportingservicesservice.exe which is sql server service.
go to (tools -> servers) add a new glassfish server instance which runs on a different, free port - that solved the problem.
The suggestion to delete "osgi-cache" worked for me on ONE machine (at work).
However on my home machine, neither that suggestion nor the suggestion to add my machine's hostname to the "hosts" file helped. Glassfish would start but Eclipse wouldn't recognize that...
The only thing that worked for me was:
go to the glassfish3/bin directory
execute "asadmin create-domain newdomain"
in this step, I was prompted for an admin username and password; I chose "admin" and "admin123" respectively
create a Glassfish server in Eclipse pointing to the new domain
Now I know that this may mean that the default domain (domain1) has some strange configuration, but that just doesn't seem right. Anyway, this did work for me, and now I can start Glassfish from within Eclipse - any Glassfish domain that I want.
HTH.
I'm using ubuntu 13.04 and had the same issue. I tried almost everything, but when i disabled IPv6 it worked. For ubuntu it's easy, just add following 3 lines to kernel parameters:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
and run sudo sysctl -p. Good luck ;)
p.s. Don't forget to disable proxy server, set Active provider to Direct at General->Network connections.
Hum. Good news is that the internal server is working.
For the external one, first thing to test is if the server can be started outside Eclipse.
Check also the domain directory known by Eclipse (hint: server properties tab), and if the location is the one you want to use.
Maybe the domain has been started with a different Glassfish Server? In this case, make sure the osgi-cache/ directory in this domain is deleted first.
If the server works outside Eclipse, triple check the registration data of this server (runtime +domain) in Eclipse itself. In fact, try a new eclipse workspace...
Is this server secured with https?
I had the samere problem with Indigo + Glassfish 3.1 plug-in accessing an already working local standalone glassfish instance (with username 'admin' and my own password set).
Fortunately doing the following did the trick for me:
stop glassfish
delete osgi-cache content ( ${GLASSFISH_3.1HOME}/glassfish/domains/domain1/osgi-cache )
set my username ('admin' in my case) and reset passowrd (no password at all)
starting glassfish from within Indigo now works!