About deploy a Codeigniter Web in Azure - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1) +--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3) +--- Thread: About deploy a Codeigniter Web in Azure (/showthread.php?tid=71779) |
About deploy a Codeigniter Web in Azure - Aryam - 09-23-2018 Hi Everybody!! I need some help, i'm trying to deploy a codeigniter proyect on azure (web app), but i having some troubles, first i have the files like that: - public - myproject - application - config - database.php - config.php - routes.php - system - template - js - css - index.php - web.config - .htaccess When i accesing my url (https://xpbc-app-2018.azurewebsites.net/ ) i get a 404 error, so i have to add /login to my page to load... and css and js files are not found.. this is my web.config: Code: <?xml version="1.0" encoding="UTF-8"?> and this is my .htaccess Code: RewriteEngine on HELP!! im not understanding nothing.. a guide could be my salvation. Some advices please.. Thanks to all (Sorry for my poor english) RE: About deploy a Codeigniter Web in Azure - jreklund - 09-23-2018 You need to change your base URL in application/config.php. That's why your CSS aren't loading. You got this at the moment. Code: <link rel="stylesheet" href="https://xpbc-app-2018.azurewebsites.net/xpbc2017/template/assets/plugins/bootstrap/css/bootstrap.min.css"> You are appending xpbc2017 for some reason. Regarding 404 you need to enable the debug log in application/config.php and look for errors in /application/logs/. You can try to change to your default controller into w/e your login controller are named. So you know that's it your default controllers fault or not. RE: About deploy a Codeigniter Web in Azure - Aryam - 09-24-2018 HI jreklund! Thanks for your answer, actually this is my config file: Code: <?php And that is why i dont undestand, why i got those errors... i check that all files in "template" exist in my server. Actually im appending to xpbc2017 because "myproject" directory is called "xpbc2017" inside of it there are application,system,templates directories.. I still having same problems to upload css and js files :S. RE: About deploy a Codeigniter Web in Azure - ignitedcms - 09-24-2018 I always think when people are first deploying a site to a new platform they should keep things simple. #1 Have a simple site with only one page and no css. #2 See if it works without a .htaccess file, and the index.php extension. Once these are in place then you can start trouble shooting the other things. The .htaccess file is the thing I do at the very end. Often, sometimes it is a case of trial and error, amending one line at a time. It could be anything, it could even be a database connection error, go to the index.php file and set the variable to 'testing' instead of production to get more detailed error messages. RE: About deploy a Codeigniter Web in Azure - jreklund - 09-24-2018 Ok, if that's the case. It's your web.config fault. You are rewriting every url to your index.php. Including css and js. You can delete your .htaccess, it's a IIS platform. Try this: Code: <?xml version="1.0" encoding="UTF-8"?> RE: About deploy a Codeigniter Web in Azure - Aryam - 09-25-2018 Hi jreklund!! I appreciate your help so much, i was losing my hope trying to configure this, I really appreciate it!! I tried the code in my web.config, still not working, you can check it. But i found that my default controller was wrong... i had my login controller in a sub directory in controllers.. that is why i got 404 error.. now i fixed it, but still css and js not loading... If you have another idea please let me know.. Thanks so much. RE: About deploy a Codeigniter Web in Azure - jreklund - 09-26-2018 This works now with the updated web.config: https://xpbc-app-2018.azurewebsites.net/template/assets/css/main.css But this dosen't: https://xpbc-app-2018.azurewebsites.net/xpbc2017/template/assets/css/main.css So remove xpbc2017 from your base_url. RE: About deploy a Codeigniter Web in Azure - Aryam - 09-27-2018 Hi jreklund!!! Hey! Thanks so much! You helped me a lot! Finally css is loading.. I have to change more things but no for configuration issues.. I really appreciate your helpful tips and advices.. RE: About deploy a Codeigniter Web in Azure - jreklund - 09-27-2018 Your welcome! I'm glad everything worked out in the end. RE: About deploy a Codeigniter Web in Azure - jreklund - 10-05-2018 Aryam Wrote:Hi Jreklund! Normally when i get 404 errors I make a comment block /* */ around all code (in that function, that are giving you a problem). And at the end you will have found the source of problem. As you move down your /* block down the code. PS. You got private message disabled, so I can't answer you. |