deploying laravel + php website on azure

HanbaPvt 41 Reputation points
2021-09-09T11:46:33.75+00:00

I want to deploy a php + laravel website but it's not working. When trying to complete the setup it is not coming up. how can I fix this issue and host my website

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,296 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tasadduq Burney 7,511 Reputation points MVP
    2021-09-09T11:54:23.557+00:00

    Hi @HanbaPvt !

    Hope you are having a great day!

    You can try out the below mentioned steps and let me know if the below mentioned solution is working for you.

    1. Go to Web component under Marketplace module in Azure Portal and search for Web App + MySQL.
    2. Click create and fill out the form. You can reuse an existing database or create a new one.
    3. Configure the Web App as a PHP application. On the web app sidebar menu, go to Settings >Configuration > General settings > Stack settings. Change stack to PHP and do not forget to choose the version of PHP your application is using and Save the Changes.
    4. We need to install composer on the web app. Go to App service and click on your web app application, then find Extensions under development tools on its menu sidebar.
      Click the Add button > choose extension, then search for "Composer". Agree to Legal terms and click ok.
    5. Upload your application
    6. Go to settings > configuration > path mappings > virtuals application and directories. Change the default folder from “site\wwwroot” to “site\wwwroot\public” and Save the Changes.

    Regards,
    Tasadduq

    __

    If the response is helpful, please click "Accept Answer" and "Upvote" it.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Jignesh Vagh 1 Reputation point
    2022-02-25T12:04:57.313+00:00

    Hello,
    I have the same issue, I am using laravel+Lumen ("php": ">7.3","laravel/lumen-framework": ">7.0" ) for 2 months its working fine right now it is giving every API 500 error after the latest deployment using pipeline in Github.

    Its Update dependency as below :


      - Removing opis/closure (3.5.5)
      - Removing paragonie/random_compat (v9.99.99)
      - Removing symfony/polyfill-php70 (v1.18.0)
      - Removing symfony/polyfill-php73 (v1.18.0)
      - Upgrading brick/math (0.8.15 => 0.9.3)
      - Upgrading doctrine/inflector (2.0.3 => 2.0.4)
      - Upgrading doctrine/instantiator (1.3.1 => 1.4.0)
      - Upgrading doctrine/lexer (1.2.1 => 1.2.2)
      - Upgrading dragonmantank/cron-expression (v2.3.0 => v3.3.1)
      - Upgrading egulias/email-validator (2.1.18 => 3.1.2)
      - Locking fruitcake/php-cors (v1.2.0)
      - Upgrading fzaninotto/faker (v1.9.1 => dev-master 5ffe7db)
      - Locking graham-campbell/result-type (v1.0.4)
      - Upgrading illuminate/auth (v7.22.4 => v9.2.0)
      - Upgrading illuminate/broadcasting (v7.22.4 => v9.2.0)
      - Upgrading illuminate/bus (v7.22.4 => v9.2.0)
      - Upgrading illuminate/cache (v7.22.4 => v9.2.0)
      - Locking illuminate/collections (v9.2.0)
      - Locking illuminate/conditionable (v9.2.0)
      - Upgrading illuminate/config (v7.22.4 => v9.2.0)
      - Upgrading illuminate/console (v7.22.4 => v9.2.0)
      - Upgrading illuminate/container (v7.22.4 => v9.2.0)
      - Upgrading illuminate/contracts (v7.22.4 => v9.2.0)
      - Upgrading illuminate/database (v7.22.4 => v9.2.0)
      - Upgrading illuminate/encryption (v7.22.4 => v9.2.0)
      - Upgrading illuminate/events (v7.22.4 => v9.2.0)
      - Upgrading illuminate/filesystem (v7.22.4 => v9.2.0)
      - Upgrading illuminate/hashing (v7.22.4 => v9.2.0)
      - Upgrading illuminate/http (v7.22.4 => v9.2.0)
      - Upgrading illuminate/log (v7.22.4 => v9.2.0)
      - Locking illuminate/macroable (v9.2.0)
      - Upgrading illuminate/pagination (v7.22.4 => v9.2.0)
      - Upgrading illuminate/pipeline (v7.22.4 => v9.2.0)
      - Upgrading illuminate/queue (v7.22.4 => v9.2.0)
      - Upgrading illuminate/session (v7.22.4 => v9.2.0)
      - Upgrading illuminate/support (v7.22.4 => v9.2.0)
      - Upgrading illuminate/testing (v7.22.4 => v9.2.0)
      - Upgrading illuminate/translation (v7.22.4 => v9.2.0)
      - Upgrading illuminate/validation (v7.22.4 => v9.2.0)
      - Upgrading illuminate/view (v7.22.4 => v9.2.0)
      - Upgrading laravel/lumen-framework (v7.2.1 => v9.0.1)
      - Locking laravel/serializable-closure (v1.1.1)
      - Upgrading league/flysystem (1.1.3 => 1.1.9)
      - Upgrading league/mime-type-detection (1.4.0 => 1.9.0)
      - Upgrading mockery/mockery (1.4.1 => 1.5.0)
      - Upgrading monolog/monolog (2.1.1 => 2.3.5)
      - Upgrading myclabs/deep-copy (1.10.1 => 1.10.2)
      - Upgrading nesbot/carbon (2.37.0 => 2.57.0)
      - Upgrading phar-io/manifest (1.0.3 => 2.0.3)
      - Upgrading phar-io/version (2.0.1 => 3.2.1)
      - Upgrading phpdocumentor/reflection-docblock (5.2.0 => 5.3.0)
      - Upgrading phpdocumentor/type-resolver (1.3.0 => 1.6.0)
      - Upgrading phpoption/phpoption (1.7.5 => 1.8.1)
      - Upgrading phpspec/prophecy (1.11.1 => v1.15.0)
      - Upgrading phpunit/php-code-coverage (7.0.10 => 7.0.15)
      - Upgrading phpunit/php-file-iterator (2.0.2 => 2.0.5)
      - Upgrading phpunit/php-timer (2.1.2 => 2.1.3)
      - Upgrading phpunit/php-token-stream (3.1.1 => 4.0.4)
      - Upgrading phpunit/phpunit (8.5.8 => 8.5.23)
      - Upgrading psr/container (1.0.0 => 2.0.2)
      - Upgrading psr/log (1.1.3 => 3.0.0)
      - Upgrading psr/simple-cache (1.0.1 => 3.0.0)
      - Upgrading ramsey/collection (1.0.1 => 1.2.2)
      - Upgrading ramsey/uuid (4.1.0 => 4.2.3)
      - Upgrading sebastian/code-unit-reverse-lookup (1.0.1 => 1.0.2)
      - Upgrading sebastian/comparator (3.0.2 => 3.0.3)
      - Upgrading sebastian/diff (3.0.2 => 3.0.3)
      - Upgrading sebastian/environment (4.2.3 => 4.2.4)
      - Upgrading sebastian/exporter (3.1.2 => 3.1.4)
      - Upgrading sebastian/global-state (3.0.0 => 3.0.2)
      - Upgrading sebastian/object-enumerator (3.0.3 => 3.0.4)
      - Upgrading sebastian/object-reflector (1.1.1 => 1.1.2)
      - Upgrading sebastian/recursion-context (3.0.0 => 3.0.1)
      - Upgrading sebastian/resource-operations (2.0.1 => 2.0.2)
      - Upgrading sebastian/type (1.1.3 => 1.1.4)
      - Upgrading symfony/console (v5.1.3 => v6.0.3)
      - Upgrading symfony/deprecation-contracts (v2.1.3 => v3.0.0)
      - Upgrading symfony/error-handler (v5.1.3 => v6.0.3)
      - Upgrading symfony/event-dispatcher (v5.1.3 => v6.0.3)
      - Upgrading symfony/event-dispatcher-contracts (v2.1.3 => v3.0.0)
      - Upgrading symfony/finder (v5.1.3 => v6.0.3)
      - Upgrading symfony/http-foundation (v5.1.3 => v6.0.3)
      - Upgrading symfony/http-kernel (v5.1.3 => v6.0.4)
      - Upgrading symfony/mime (v5.1.3 => v6.0.3)
      - Upgrading symfony/polyfill-ctype (v1.18.0 => v1.24.0)
      - Upgrading symfony/polyfill-intl-grapheme (v1.18.0 => v1.24.0)
      - Upgrading symfony/polyfill-intl-idn (v1.18.0 => v1.24.0)
      - Upgrading symfony/polyfill-intl-normalizer (v1.18.0 => v1.24.0)
      - Upgrading symfony/polyfill-mbstring (v1.18.0 => v1.24.0)
      - Upgrading symfony/polyfill-php72 (v1.18.0 => v1.24.0)
      - Upgrading symfony/polyfill-php80 (v1.18.0 => v1.24.0)
      - Locking symfony/polyfill-php81 (v1.24.0)
      - Upgrading symfony/process (v5.1.3 => v6.0.3)
      - Upgrading symfony/service-contracts (v2.1.3 => v3.0.0)
      - Upgrading symfony/string (v5.1.3 => v6.0.3)
      - Upgrading symfony/translation (v5.1.3 => v6.0.3)
      - Upgrading symfony/translation-contracts (v2.1.3 => v3.0.0)
      - Upgrading symfony/var-dumper (v5.1.3 => v6.0.3)
      - Upgrading theseer/tokenizer (1.2.0 => 1.2.1)
      - Upgrading vlucas/phpdotenv (v4.1.8 => v5.4.1)
      - Upgrading voku/portable-ascii (1.5.3 => 2.0.0)
      - Upgrading webmozart/assert (1.9.1 => 1.10.0)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 104 installs, 0 updates, 0 removals
      - Downloading doctrine/inflector (2.0.4)
      - Downloading symfony/polyfill-php72 (v1.24.0)
      - Downloading symfony/polyfill-intl-normalizer (v1.24.0)
      - Downloading symfony/polyfill-intl-idn (v1.24.0)
      - Downloading doctrine/lexer (1.2.2)
      - Downloading egulias/email-validator (3.1.2)
      - Downloading symfony/polyfill-mbstring (v1.24.0)
      - Downloading symfony/deprecation-contracts (v3.0.0)
      - Downloading symfony/http-foundation (v6.0.3)
      - Downloading fruitcake/php-cors (v1.2.0)
      - Downloading fzaninotto/faker (dev-master 5ffe7db)
      - Downloading illuminate/conditionable (v9.2.0)
      - Downloading symfony/finder (v6.0.3)
      - Downloading voku/portable-ascii (2.0.0)
      - Downloading symfony/translation-contracts (v3.0.0)
      - Downloading symfony/translation (v6.0.3)
      - Downloading symfony/polyfill-php80 (v1.24.0)
      - Downloading nesbot/carbon (2.57.0)
      - Downloading illuminate/macroable (v9.2.0)
      - Downloading psr/simple-cache (3.0.0)
      - Downloading psr/container (2.0.2)
      - Downloading illuminate/contracts (v9.2.0)
      - Downloading illuminate/collections (v9.2.0)
      - Downloading illuminate/support (v9.2.0)
      - Downloading illuminate/filesystem (v9.2.0)
      - Downloading illuminate/session (v9.2.0)
      - Downloading symfony/polyfill-ctype (v1.24.0)
      - Downloading phpoption/phpoption (1.8.1)
      - Downloading graham-campbell/result-type (v1.0.4)
      - Downloading vlucas/phpdotenv (v5.4.1)
      - Downloading symfony/var-dumper (v6.0.3)
      - Downloading symfony/mime (v6.0.3)
      - Downloading psr/event-dispatcher (1.0.0)
      - Downloading symfony/event-dispatcher-contracts (v3.0.0)
      - Downloading symfony/event-dispatcher (v6.0.3)
      - Downloading psr/log (3.0.0)
      - Downloading symfony/error-handler (v6.0.3)
      - Downloading symfony/http-kernel (v6.0.4)
      - Downloading symfony/polyfill-intl-grapheme (v1.24.0)
      - Downloading symfony/string (v6.0.3)
      - Downloading symfony/service-contracts (v3.0.0)
      - Downloading symfony/console (v6.0.3)
      - Downloading nikic/fast-route (v1.3.0)
      - Downloading illuminate/container (v9.2.0)
      - Downloading illuminate/pipeline (v9.2.0)
      - Downloading illuminate/bus (v9.2.0)
      - Downloading illuminate/events (v9.2.0)
      - Downloading illuminate/view (v9.2.0)
      - Downloading illuminate/translation (v9.2.0)
      - Downloading illuminate/validation (v9.2.0)
      - Downloading illuminate/testing (v9.2.0)
      - Downloading symfony/process (v6.0.3)
      - Downloading symfony/polyfill-php81 (v1.24.0)
      - Downloading ramsey/collection (1.2.2)
      - Downloading brick/math (0.9.3)
      - Downloading ramsey/uuid (4.2.3)
      - Downloading laravel/serializable-closure (v1.1.1)
      - Downloading illuminate/database (v9.2.0)
      - Downloading illuminate/console (v9.2.0)
      - Downloading illuminate/queue (v9.2.0)
      - Downloading illuminate/pagination (v9.2.0)
      - Downloading monolog/monolog (2.3.5)
      - Downloading illuminate/log (v9.2.0)
      - Downloading illuminate/http (v9.2.0)
      - Downloading illuminate/hashing (v9.2.0)
      - Downloading illuminate/encryption (v9.2.0)
      - Downloading illuminate/config (v9.2.0)
      - Downloading illuminate/cache (v9.2.0)
      - Downloading illuminate/broadcasting (v9.2.0)
      - Downloading illuminate/auth (v9.2.0)
      - Downloading webmozart/assert (1.10.0)
      - Downloading dragonmantank/cron-expression (v3.3.1)
      - Downloading laravel/lumen-framework (v9.0.1)
      - Downloading league/mime-type-detection (1.9.0)
      - Downloading league/flysystem (1.1.9)
      - Downloading hamcrest/hamcrest-php (v2.0.1)
      - Downloading mockery/mockery (1.5.0)
      - Downloading phpdocumentor/reflection-common (2.2.0)
      - Downloading phpdocumentor/type-resolver (1.6.0)
      - Downloading phpdocumentor/reflection-docblock (5.3.0)
      - Downloading phpunit/php-token-stream (4.0.4)
      - Downloading sebastian/version (2.0.1)
      - Downloading sebastian/type (1.1.4)
      - Downloading sebastian/resource-operations (2.0.2)
      - Downloading sebastian/recursion-context (3.0.1)
      - Downloading sebastian/object-reflector (1.1.2)
      - Downloading sebastian/object-enumerator (3.0.4)
      - Downloading sebastian/global-state (3.0.2)
      - Downloading sebastian/exporter (3.1.4)
      - Downloading sebastian/environment (4.2.4)
      - Downloading sebastian/diff (3.0.3)
      - Downloading sebastian/comparator (3.0.3)
      - Downloading phpunit/php-timer (2.1.3)
      - Downloading phpunit/php-text-template (1.2.1)
      - Downloading phpunit/php-file-iterator (2.0.5)
      - Downloading theseer/tokenizer (1.2.1)
      - Downloading sebastian/code-unit-reverse-lookup (1.0.2)
      - Downloading phpunit/php-code-coverage (7.0.15)
      - Downloading doctrine/instantiator (1.4.0)
      - Downloading phpspec/prophecy (v1.15.0)
      - Downloading phar-io/version (3.2.1)
      - Downloading phar-io/manifest (2.0.3)
      - Downloading myclabs/deep-copy (1.10.2)
      - Downloading phpunit/phpunit (8.5.23)
      - Installing doctrine/inflector (2.0.4): Extracting archive
      - Installing symfony/polyfill-php72 (v1.24.0): Extracting archive
      - Installing symfony/polyfill-intl-normalizer (v1.24.0): Extracting archive
      - Installing symfony/polyfill-intl-idn (v1.24.0): Extracting archive
      - Installing doctrine/lexer (1.2.2): Extracting archive
      - Installing egulias/email-validator (3.1.2): Extracting archive
      - Installing symfony/polyfill-mbstring (v1.24.0): Extracting archive
      - Installing symfony/deprecation-contracts (v3.0.0): Extracting archive
      - Installing symfony/http-foundation (v6.0.3): Extracting archive
      - Installing fruitcake/php-cors (v1.2.0): Extracting archive
      - Installing fzaninotto/faker (dev-master 5ffe7db): Extracting archive
      - Installing illuminate/conditionable (v9.2.0): Extracting archive
      - Installing symfony/finder (v6.0.3): Extracting archive
      - Installing voku/portable-ascii (2.0.0): Extracting archive
      - Installing symfony/translation-contracts (v3.0.0): Extracting archive
      - Installing symfony/translation (v6.0.3): Extracting archive
      - Installing symfony/polyfill-php80 (v1.24.0): Extracting archive
      - Installing nesbot/carbon (2.57.0): Extracting archive
      - Installing illuminate/macroable (v9.2.0): Extracting archive
      - Installing psr/simple-cache (3.0.0): Extracting archive
      - Installing psr/container (2.0.2): Extracting archive
      - Installing illuminate/contracts (v9.2.0): Extracting archive
      - Installing illuminate/collections (v9.2.0): Extracting archive
      - Installing illuminate/support (v9.2.0): Extracting archive
      - Installing illuminate/filesystem (v9.2.0): Extracting archive
      - Installing illuminate/session (v9.2.0): Extracting archive
      - Installing symfony/polyfill-ctype (v1.24.0): Extracting archive
      - Installing phpoption/phpoption (1.8.1): Extracting archive
      - Installing graham-campbell/result-type (v1.0.4): Extracting archive
      - Installing vlucas/phpdotenv (v5.4.1): Extracting archive
      - Installing symfony/var-dumper (v6.0.3): Extracting archive
      - Installing symfony/mime (v6.0.3): Extracting archive
      - Installing psr/event-dispatcher (1.0.0): Extracting archive
      - Installing symfony/event-dispatcher-contracts (v3.0.0): Extracting archive
      - Installing symfony/event-dispatcher (v6.0.3): Extracting archive
      - Installing psr/log (3.0.0): Extracting archive
      - Installing symfony/error-handler (v6.0.3): Extracting archive
      - Installing symfony/http-kernel (v6.0.4): Extracting archive
      - Installing symfony/polyfill-intl-grapheme (v1.24.0): Extracting archive
      - Installing symfony/string (v6.0.3): Extracting archive
      - Installing symfony/service-contracts (v3.0.0): Extracting archive
      - Installing symfony/console (v6.0.3): Extracting archive
      - Installing nikic/fast-route (v1.3.0): Extracting archive
      - Installing illuminate/container (v9.2.0): Extracting archive
      - Installing illuminate/pipeline (v9.2.0): Extracting archive
      - Installing illuminate/bus (v9.2.0): Extracting archive
      - Installing illuminate/events (v9.2.0): Extracting archive
      - Installing illuminate/view (v9.2.0): Extracting archive
      - Installing illuminate/translation (v9.2.0): Extracting archive
      - Installing illuminate/validation (v9.2.0): Extracting archive
      - Installing illuminate/testing (v9.2.0): Extracting archive
      - Installing symfony/process (v6.0.3): Extracting archive
      - Installing symfony/polyfill-php81 (v1.24.0): Extracting archive
      - Installing ramsey/collection (1.2.2): Extracting archive
      - Installing brick/math (0.9.3): Extracting archive
      - Installing ramsey/uuid (4.2.3): Extracting archive
      - Installing laravel/serializable-closure (v1.1.1): Extracting archive
      - Installing illuminate/database (v9.2.0): Extracting archive
      - Installing illuminate/console (v9.2.0): Extracting archive
      - Installing illuminate/queue (v9.2.0): Extracting archive
      - Installing illuminate/pagination (v9.2.0): Extracting archive
      - Installing monolog/monolog (2.3.5): Extracting archive
      - Installing illuminate/log (v9.2.0): Extracting archive
      - Installing illuminate/http (v9.2.0): Extracting archive
      - Installing illuminate/hashing (v9.2.0): Extracting archive
      - Installing illuminate/encryption (v9.2.0): Extracting archive
      - Installing illuminate/config (v9.2.0): Extracting archive
      - Installing illuminate/cache (v9.2.0): Extracting archive
      - Installing illuminate/broadcasting (v9.2.0): Extracting archive
      - Installing illuminate/auth (v9.2.0): Extracting archive
      - Installing webmozart/assert (1.10.0): Extracting archive
      - Installing dragonmantank/cron-expression (v3.3.1): Extracting archive
      - Installing laravel/lumen-framework (v9.0.1): Extracting archive
      - Installing league/mime-type-detection (1.9.0): Extracting archive
      - Installing league/flysystem (1.1.9): Extracting archive
      - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive
      - Installing mockery/mockery (1.5.0): Extracting archive
      - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
      - Installing phpdocumentor/type-resolver (1.6.0): Extracting archive
      - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive
      - Installing phpunit/php-token-stream (4.0.4): Extracting archive
      - Installing sebastian/version (2.0.1): Extracting archive
      - Installing sebastian/type (1.1.4): Extracting archive
      - Installing sebastian/resource-operations (2.0.2): Extracting archive
      - Installing sebastian/recursion-context (3.0.1): Extracting archive
      - Installing sebastian/object-reflector (1.1.2): Extracting archive
      - Installing sebastian/object-enumerator (3.0.4): Extracting archive
      - Installing sebastian/global-state (3.0.2): Extracting archive
      - Installing sebastian/exporter (3.1.4): Extracting archive
      - Installing sebastian/environment (4.2.4): Extracting archive
      - Installing sebastian/diff (3.0.3): Extracting archive
      - Installing sebastian/comparator (3.0.3): Extracting archive
      - Installing phpunit/php-timer (2.1.3): Extracting archive
      - Installing phpunit/php-text-template (1.2.1): Extracting archive
      - Installing phpunit/php-file-iterator (2.0.5): Extracting archive
      - Installing theseer/tokenizer (1.2.1): Extracting archive
      - Installing sebastian/code-unit-reverse-lookup (1.0.2): Extracting archive
      - Installing phpunit/php-code-coverage (7.0.15): Extracting archive
      - Installing doctrine/instantiator (1.4.0): Extracting archive
      - Installing phpspec/prophecy (v1.15.0): Extracting archive
      - Installing phar-io/version (3.2.1): Extracting archive
      - Installing phar-io/manifest (2.0.3): Extracting archive
      - Installing myclabs/deep-copy (1.10.2): Extracting archive
      - Installing phpunit/phpunit (8.5.23): Extracting archive
    Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Generating optimized autoload files
    58 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    

    In the local machine, it's working fine.

    0 comments No comments